Editing Apparatus

ABSTRACT

An editing apparatus includes a processor and a memory configured to store computer-readable instructions. The computer-readable instructions, when executed by the processor, cause the editing apparatus to perform processes that include causing a mark and at least one portion of a character string to be displayed, causing a selection image to be displayed in a state in which the at least one portion of the character string and the mark are displayed, performing, in a case where the selection image is displayed, a determination whether the mark ceases to be displayed in an outer side of one of a left edge and a right edge of the selection image, and moving the at least one portion of the character string and the mark to a position where the mark is displayed in the outer side, in response to determining that the mark ceases to be displayed in the outer side.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority to Japanese Patent Application No.2014-102575 filed May 16, 2014 and Japanese Patent Application No.2014-171141 filed Aug. 26, 2014. The contents of the foregoingapplications are hereby incorporated herein by reference.

BACKGROUND

The present disclosure relates to an editing apparatus that is capableof editing, in accordance with a user operation, a character string thatis displayed on a display portion.

An editing apparatus is known that is capable of editing, in accordancewith a user operation, a character string that is displayed on a displayportion. Specific examples of editing actions are the adding andinserting of a character and a symbol to the character string, as wellas the deleting of a character that is included in the character string.A technology is known that displays on a display portion a window inwhich a plurality of editing actions are shown in list form ascandidates for selection. The user may perform an operation that selectsone of the plurality of the editing actions in the window. The user isthus able use the selected edit action to edit the character string thatis displayed on the display portion.

SUMMARY

Embodiments provide an editing apparatus that includes a processor and amemory. The memory is configured to store computer-readableinstructions. The computer-readable instructions, when executed by theprocessor, cause the editing apparatus to perform processes that includecausing a mark and at least one portion of a character string to bedisplayed on a display portion, the at least one portion of thecharacter string being configured to be displayed left-justified on thedisplay portion in a left-right direction, the mark being configured tobe displayed in a position in relation to the at least one portion ofthe character string, and the mark indicating a position where thecharacter string is to be edited in accordance with an operation on aninput portion, causing a selection image to be displayed in a portion ofthe display portion in a state in which the at least one portion of thecharacter string and the mark are displayed, the selection image beingan image to be used for selecting one of a plurality of editing actions,performing, in a case where the selection image is displayed in theportion of the display portion, a determination whether the mark ceasesto be displayed in an outer side of one of a left edge and a right edgeof the selection image in the left-right direction, and moving the atleast one portion of the character string and the mark to a positionwhere the mark is displayed in the outer side of the one of the leftedge and the right edge of the selection image, in response todetermining that the mark ceases to be displayed in the outer side ofthe one of the left edge and the right edge of the selection image.

Embodiments also provide an editing apparatus that includes a processorand a memory. The memory is configured to store computer-readableinstructions, wherein the computer-readable instructions, when executedby the processor, cause the editing apparatus to perform processes thatinclude causing a print image to be displayed in a first area of adisplay portion and a mark and at least one portion of a targetcharacter string to be displayed in a second area of the displayportion, the print image including a plurality of blocks, a plurality ofcharacter strings being respectively associated with the plurality ofthe blocks, the target character string being one of the plurality ofthe character strings that corresponds to a corresponding block, thecorresponding block being one of the plurality of the blocks, the markindicating a position where editing is to be performed on the targetcharacter string, and the second area being a different area from thefirst area, causing a selection image to be displayed in a third area ofthe display portion in a state in which the print image is displayed inthe first area and the target character string is displayed in thesecond area, the selection image being an image to be used for selectingone of a plurality of editing actions, and the third area including atleast one portion of the first area and at least one portion of thesecond area, performing a first determination whether the correspondingblock included in the print image displayed in the first area overlapswith the selection image displayed in the third area, causing the entirecorresponding block to be displayed in a first residual area bymodifying a form in which the print image is displayed, in response todetermining that the corresponding block overlaps with the selectionimage, the first residual area being an area, within the first area,that is exclusive of the third area, performing a second determinationwhether the mark displayed in the second area overlaps with theselection image displayed in the third area, reducing a size of thetarget character string in response to determining that the markoverlaps with the selection image, and causing the mark and at least oneportion of a reduced character string to be displayed in a secondresidual area, the reduced character string being the target characterstring whose size is reduced, and the second residual area being anarea, within the second area, that is exclusive of the third area.

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments will be described below in detail with reference to theaccompanying drawings in which:

FIG. 1 is an oblique view of a printer;

FIG. 2 is a block diagram that shows an electrical configuration of theprinter;

FIG. 3 is a figure that shows edit screens according to a firstembodiment;

FIG. 4 is a flowchart of first main processing;

FIG. 5 is a flowchart of second main processing;

FIG. 6 is a figure that shows edit screens in a modified example of thefirst embodiment;

FIG. 7 is a figure that shows edit screens according to a secondembodiment;

FIG. 8 is a flowchart of third main processing;

FIG. 9 is a flowchart of fourth main processing;

FIG. 10 is a flowchart of the fourth main processing, continuing fromFIG. 9; and

FIG. 11 is a figure that shows edit screens in a modified example of thesecond embodiment.

DETAILED DESCRIPTION

Embodiments will be explained with reference to the drawings. In theexplanation that follows, the top side, the bottom side, the upper rightside, the lower left side, the upper left side, and the lower right sidein FIG. 1 respectively define the front side, the rear side, the topside, the bottom side, the left side, and the right side of a printer 1.As shown in FIG. 1, the printer 1 is a hand-held electronic device thata user can operate while holding the printer 1 in the hand. Inaccordance with input operations that are made using a keyboard 5 and atouch panel 7, the printer 1 is able to perform editing of a characterstring that is displayed on a display portion 4. The printer 1 is ableto generate printing data based on the character string that isdisplayed on the display portion 4. Based on the generated printingdata, the printer 1 is able to perform printing by forming a pluralityof dots on a tape (a cover film) that is a printing medium. In thismanner, the printer 1 is able to create a label.

The printer 1 includes a body 2 and a cover 3. The body 2 has asubstantially three-dimensional rectangular shape whose long axisextends up and down. The body 2 includes the display portion 4, thekeyboard 5, a lever 6, and the touch panel 7. The display portion 4 andthe keyboard 5 are provided on the front face of the body 2. The lever 6is provided on the left side face of the body 2. The display portion 4is a liquid crystal display that is capable of displaying a characterfor printing. The shape of the display portion 4 is rectangular, withits long axis extending left to right in a plan view. The touch panel 7is provided on the surface of the display portion 4. The keyboard 5 isprovided below the display portion 4. The keyboard 5 includes input keysand functional keys. The input keys include character keys (textcharacters, numeric characters, and the like), direction keys (up, down,left, right), a Delete key, and a Backspace key. The functional keysinclude Function keys (hereinafter called the Fn keys) and a Print key.A cutter can cut the tape in response to the pressing of the lever 6.The portion of the tape on which the printing has been done can thus becut off.

A cassette mounting portion (not shown in the drawings) is provided onthe rear side of the body 2. A tape cassette can be mounted in thecassette mounting portion. The cover 3 is provided on the rear side ofthe cassette mounting portion. The cover 3 can be opened and closed. Inits closed state, the cover 3 can cover the tape cassette. When thecover 3 is in the open state, the user is able to replace the tapecassette. The tape cassette includes an ink ribbon roll, a base materialtape roll, and a cover film roll.

From the ink ribbon roll, the base material tape roll, and the coverfilm roll of the tape cassette, the printer 1 draws out an ink ribbon, abase material tape, and the cover film, respectively. The printer 1performs printing on the cover film by using a thermal head 10 (refer toFIG. 2) to heat the ink ribbon. The printer 1 sticks the base materialtape onto the printed cover film. By this process, the printer 1 cancreate a label in which the printed cover film and the base materialtape are stuck together.

An electrical configuration of the printer 1 will be explained withreference to FIG. 2. The printer 1 includes a control circuit 400. Thecontrol circuit 400 is formed on a control circuit board that is fixedin place inside the body 2 (refer to FIG. 1). The control circuit 400includes a CPU 401, a ROM 402, an EEPROM 403, a RAM 404, a flash ROM405, and an input/output interface 410. The CPU 401, the ROM 402, theEEPROM 403, the RAM 404, the flash ROM 405, and the input/outputinterface 410 are electrically connected through a bus 414.

The CPU 401 controls the entire printer 1. The ROM 402 stores programsthat the CPU 401 can execute. The CPU 401 performs various types ofcomputations based on the programs that are stored in the ROM 402. TheEEPROM 403 stores sets of dot pattern data for printing, which areclassified according to format and size, in association with code data.The dot pattern data for printing are data for printing text characters,numeric characters, symbols, and bar codes.

The RAM 404 stores data temporarily. The flash ROM 405 stores theprinting data that are generated.

The keyboard 5, the touch panel 7, drive circuits 406, 407, 408, and anexternal interface 409 are connected to the input/output interface 410.The drive circuit 406 includes a video RAM (not shown in the drawings)for displaying images on the display portion 4. The drive circuit 406performs display control of the display portion 4. The keyboard 5outputs to the input/output interface 410 information that indicates thetype of a selected key. The touch panel 7 outputs to the input/outputinterface 410 coordinate information that indicates a touched position.The drive circuit 407 causes electricity to flow through heatingelements of the thermal head 10. The drive circuit 408 rotationallydrives motors 231 and 241. The motor 231 is connected to a platen roller23. The platen roller 23 can rotate in accordance with the rotationaldrive of the motor 231 while pressing the cover film and the ink ribbonagainst the thermal head 10. The motor 241 is connected to a pressingroller 24. The pressing roller 24 can rotate in accordance with therotational drive of the motor 241 while pressing the base material tapeagainst the printed cover film. The external interface 409 is acommunication integrated circuit (IC) for performing communication withan external device 9. The external device 9 may be a general-purpose PC.

An edit screen 100 (edit screens 100A to 100C) according to a firstembodiment will be explained with reference to FIG. 3. The edit screen100A is displayed on the display portion 4 in a case where an operationis input through the keyboard 5 to start editing of a character stringthat is to be printed on the tape. The edit screen 100 includes acharacter string 40, a cursor 41, a font setting 42, a tape length 43,and a partition line 44. The partition line 44 extends horizontallyacross the display portion 4 at a point that is higher than the center,in the up-down direction, of the display portion 4. Hereinafter, thearea within the display portion 4 that is below the partition line 44 iscalled the first display area 4A. Hereinafter, the area within thedisplay portion 4 that is above the partition line 44 is called thesecond display area 4B.

The character string 40 is displayed in the first display area 4A. Thecharacter string 40 is a character string to be printed. The maximumnumber of lines of the character string 40 that can be displayed on theedit screen 100 is one. The character string 40 includes a plurality ofcharacters 40A. The plurality of the characters 40A are arrayed in theleft-right direction. The maximum number of the characters 40A that canbe displayed on the display portion 4 is 20. The character string 40 isdisplayed left-justified.

The cursor 41 is a mark that indicates the position that is to be editedwhen the character string 40 is edited. The cursor 41 is a straight linesegment that extends vertically. The vertical length of the cursor 41 isapproximately equal to the vertical length of each one of the pluralityof the characters 40A. The cursor 41 blinks at regular intervals. Thecursor 41 is positioned to one of the left and the right of one of theplurality of the characters 40A.

In a case where a character key on the keyboard 5 is pressed, forexample, the character that corresponds to the pressed character key isadded to the character string 40 at the position to the right of thecursor 41 and displayed. In this case, the position to the right of thecursor 41 is specified as an adding position where the character isadded. In a case where a character is added at the adding position, thecursor 41 is moved to the right side of the added character. In a casewhere the Delete key on the keyboard 5 is pressed, for example, the oneof the plurality of the characters 40A that is to the right of thecursor 41 is deleted from the character string 40. In this case, theposition to the right of the cursor 41 is specified as a deletingposition where the character 40A is deleted. In a case where a character40A is deleted by the pressing of the Delete key, the cursor 41 is notmoved. In a case where the Backspace key on the keyboard 5 is pressed,for example, the one of the plurality of the characters 40A that is tothe left of the cursor 41 is deleted from the character string 40. Inthis case, the position to the left of the cursor 41 is specified as thedeleting position where the character is deleted. In a case where acharacter is deleted by the pressing of the Backspace key, the cursor 41is moved to the right side of the character 40A that is positioned onthe left side of the deleted character 40A. The cursor 41 is moved toone of the left and the right in response to the pressing of thedirection key on the keyboard 5.

It is assumed that the printer 1 is operated while being held in thehand. Accordingly, the size of the printer 1 is smaller than that of astationary printer, and the resolution of the display portion 4 islower. Therefore, as described above, the number of lines of thecharacter string 40 and the number of the plurality of the characters40A that can be displayed on the display portion 4 at one time arerestricted. That means that in a case where the total number of theplurality of the characters 40A in the character string 40 is greaterthan the maximum number of characters (twenty characters), the CPU 401is not able to display all of the plurality of the characters 40A on thedisplay portion 4 at one time. In that case, the CPU 401 moves (scrolls)the character string 40 to the left, such that the cursor 41 isconstantly displayed on the display portion 4.

The shape of the cursor 41 and the locations of the adding position andthe deleting position in relation to the cursor 41 are not limited tothe examples described above. For example, the shape of the cursor 41may be a rectangle of a size that is able to cover any one of theplurality of the characters 40A. In that case, among the plurality ofthe characters 40A of the character string 40, the cursor 41 can bedisposed to the left of the leftmost (first) character 40A, to the rightof the rightmost (last) character 40A, and at the position of any one ofthe plurality of the characters 40A. In that case, the position of thecursor 41 may be specified as the adding position and the deletingposition.

The font setting 42 and the tape length 43 are displayed in the seconddisplay area 4B. The font setting 42 includes a font 421 and a charactersize 422. An image of the character size 422 (an image of threeoverlapping letters “A”) indicates an operating mode in which thecharacter size is automatically adjusted to match the width of the tape.The tape length 43 indicates the length of the tape that is to beprinted by the printer 1.

In a case where one of the Fn keys on the keyboard 5 is pressed, theedit screen 100B, an example of which is shown in FIG. 3, is displayed.In a case where one of the Fn keys is pressed, a selection image 46 isdisplayed within the first display area 4A on the display portion 4, tothe right of the center, in the left-right direction, of the displayportion 4. The overall shape of the selection image 46 is a rectanglewhose long axis extends in the left-right direction. The length of theselection image 46 in the left-right direction is less than half of thelength of the display portion 4 in the left-right direction. The lengthof the selection image 46 in the up-down direction is slightly less thanthe length of the first display area 4A in the up-down direction. Theposition of the top edge of the selection image 46 is congruent with theposition of the partition line 44. The bottom edge of the selectionimage 46 is positioned above the bottom edge of the display portion 4.The left edge of the selection image 46 is positioned to the right ofthe center, in the left-right direction, of the display portion 4. Theright edge of the selection image 46 is positioned to the left of theright edge of the display portion 4.

The selection image 46 is given priority for display over the characterstring 40 and the cursor 41. Therefore, in a case where the selectionimage 46 is displayed such that the character string 40 and the cursor41 overlap with the selection image 46, priority is given to displayingthe selection image 46 in the area of overlap, and the character string40 and the cursor 41 are not displayed in that area.

The selection image 46 is partitioned into menu images 461, 462, 463,and 464, in which characters that describe a plurality of editingactions, “Input Symbol”, “Input Bar Code”, “Input Tab”, and “Delete”,are respectively displayed. The menu images 461 to 464 are arrayed inthe up-down direction. In a case where a selection operation in whichthe position of one of the menu images 461 to 464 in the selection image46 is touched is detected through the touch panel 7, the CPU 401 editsthe character string 40 with the corresponding editing action.

The menu image 461 (“Input Symbol”) corresponds to an editing actionthat adds to the character string 40 a symbol that is not included onthe keyboard 5. In a case where a selection operation in which the menuimage 461 is touched is detected through the touch panel 7, the CPU 401displays in the menu image 461 a list of a plurality of symbols that canbe added, instead of displaying the characters “Input Symbol”. In a casewhere a selection operation in which the position of one of theplurality of the symbols is touched is detected through the touch panel7, the CPU 401 adds the corresponding symbol to the character string 40in the adding position to the right of the cursor 41 and displays thesymbol.

The menu image 462 (“Input Bar Code”) corresponds to an editing actionthat adds a bar code to the character string 40. In a case where aselection operation in which the menu image 462 is touched is detectedthrough the touch panel 7, the CPU 401 displays in the menu image 462 aninput screen through which a plurality of numerals can be input, insteadof displaying the characters “Input Bar Code”. In a case where anoperation by which a plurality of numerals have been input is detectedthrough the keyboard 5, the CPU 401 creates a bar code that indicatesthe detected numerals. The CPU 401 adds the created bar code to thecharacter string 40 in the adding position to the right of the cursor 41and displays the bar code.

The menu image 463 (“Input Tab”) corresponds to an editing action thatinputs a tab. In a case where a selection operation in which the menuimage 463 is touched is detected through the touch panel 7, the CPU 401adds a tab to the character string 40 in the adding position to theright of the cursor 41 and displays the tab.

The menu image 464 (“Delete”) corresponds to an editing action thatdeletes one of the plurality of the characters 40A from the characterstring 40. In a case where a selection operation in which the menu image464 is touched is detected through the touch panel 7, the CPU 401deletes from the character string 40 the character 40A that is in thedeleting position to the left of the cursor 41. The editing action bythe menu image 464 (“Delete”) is the same as the editing action in acase where the Backspace key is pressed on the keyboard 5.

A menu image other than those described above may be included in theselection image 46. A scroll bar may be provided in the selection image46, such that any one of a plurality of menu images is selectivelydisplayed.

A case in which one of the Fn keys is pressed and the selection image 46is displayed while the edit screen 100A is being displayed is used as anexample. The character string 40 “Brother indust” is displayed on theedit screen 100A. The cursor 41 is displayed to the right of the lastcharacter 40A “t” of the character string 40. The position of the cursor41 is to the right of the center, in the left-right direction, of thedisplay portion 4. It is assumed that the selection image 46 isdisplayed while the position of the character string 40 in the editscreen 100A is maintained. In that case, the selection image 46 overlapsthe cursor 41 and a portion of the character string 40, and the cursor41 and the portion of the character string 40 are not displayed. Incontrast, as shown in the edit screen 100B, the CPU 401 moves thecharacter string 40 and the cursor 41 to the left (the arrow 31) to aposition where the cursor 41 is not overlapped by the displayedselection image 46, or more specifically, until the cursor 41 isdisposed in a position that is one character's width to the left of theleft edge of the displayed selection image 46. The user is thereforeable to check the position of the cursor 41 in relation to the characterstring 40, even after the selection image 46 is displayed. The user isalso able to check one of the adding position and the deleting positionthat is indicated by the cursor 41. The user is therefore able torecognize the adding position and the deleting position in relation tothe character string 40, even after the selection image 46 is displayed.Accordingly, the user may easily perform editing of the character string40 by selecting one of the menu images 461 to 464. The moving of thecharacter string 40 causes at least one of the plurality of thecharacters 40A at left end (the start) of the character string 40 tocease to be displayed on the display portion 4.

A case in which an operation that selects the menu image 463 (“InputTab”) in the selection image 46 is performed while the edit screen 100Bis being displayed is used as an example. In this case, the CPU 401first adds a tab to the character string 40 in the adding position, thenmoves the cursor 41 to the right side of the added tab. Next, as shownin the edit screen 100C, the CPU 401 moves the character string 40farther to the left (the arrow 32) to a position where the cursor 41 isnot overlapped by the displayed selection image 46 after the tab hasbeen added, or more specifically, until the cursor 41 is disposed in aposition that is one character's width to the left of the left edge ofthe displayed selection image 46. The user is therefore able to continuechecking the position of the cursor 41 in relation to the characterstring 40, even after the menu image 463 of the selection image 46 isselected and the character string 40 is edited. The user is also able tocontinue checking the adding position or the deleting position that isindicated by the cursor 41. The CPU 401 also moves the character string40 to the left to a position where the cursor 41 is not overlapped bythe displayed selection image 46 in a case in which operations thatselect any one of the menu image 461 (“Input Symbol”) and the menu image462 (“Input Bar Code”) are performed, although these cases are not beexplained in detail. The user is therefore able to continue recognizingthe adding position and the deleting position in relation to thecharacter string 40, even after the character string 40 is edited inaccordance with an editing action that corresponds to one of the menuimages 461 to 463.

A case in which an operation that selects the menu image 464 (“Delete”)in the selection image 46 is performed while the edit screen 100C isbeing displayed is used as an example. In this case, the CPU 401 firstdeletes the tab in the deleting position to the left of the cursor 41 inthe character string 40, then moves the cursor 41 to the right side ofthe character 40A “t” that was to the left of the deleted tab. Next, theCPU 401 moves the character string 40 to the right by the amount thatthe character string 40 was moved to the left (the arrow 32) when thetab was added by the selecting of the menu image 463 (“Input Tab”). Thatcauses the edit screen 100C to revert to the edit screen 100B. In otherwords, the CPU 401 moves the character string 40 to the right until thecursor 41 is disposed in a position that is one character's width to theleft of the left edge of the displayed selection image 46. In this case,the user is able to recognize a greater number of the characters 40Athat are contained in the character string 40, while continuing torecognize the position of the cursor 41 and to recognize the addingposition or the deleting position in relation to the character string40.

In a case where one of the Fn keys is pressed again while one of theedit screen 100B and the edit screen 100C is being displayed, theselection image 46 is deleted, and the edit screen 100 reverts to theoriginal edit screen 100A. In a case where the Print key on the keyboard5 is pressed while one of the edit screens 100A to 100C is beingdisplayed, the CPU 401 generates the printing data for printing thecharacter string 40 on the tape (the cover film). The CPU 401 creates alabel by printing the character string 40 on the tape (the cover film)based on the generated printing data.

The specific processing that the CPU 401 performs in the firstembodiment in order to implement an editing operation on the characterstring 40 that are described above will be explained. Programs for firstmain processing (refer to FIG. 4) and second main processing (refer toFIG. 5) are stored in the ROM 402. The first main processing and thesecond main processing are started by the CPU 401's executing of theprograms that are stored in the ROM 402 when an operation for startingthe editing of the character string 40 is performed through the keyboard5. The first main processing corresponds to the editing processing ofthe character string 40 that is performed when a character key on thekeyboard 5 is pressed. The second main processing corresponds to theediting processing of the character string 40 that is performed when oneof the menu images 461 to 464 (refer to FIG. 3) in the selection image46 is selected. The first main processing and the second main processingare performed in parallel.

A character string buffer that is used when the first main processingand the second main processing are performed by the CPU 401 will beexplained. The plurality of the characters 40A of the character string40 (refer to FIG. 3) are stored in order in the character string bufferin response to the pressing of a character key on the keyboard 5 or theselecting of one of the menu images 461 to 464 in the selection image46. The plurality of the characters 40A include a symbol, a bar code,and a tab.

Variables that are used when the first main processing and the secondmain processing are performed by the CPU 401 will be explained withreference to FIG. 3. Specifically, the variables are a cursor displayposition offset, a first value, a second value, a third value, a fourthvalue, a subtraction value, a specified value, a starting positionoffset, a first movement value, and a second movement value. For thevariables, a single unit is defined as the left-right width of a singlecharacter that is displayed on the display portion 4. In the presentembodiment, it is assumed that the plurality of the characters 40A ofthe character string 40 that is displayed in the first display area 4Aare all full-width characters.

The cursor display position offset indicates the display position of thecursor 41 by the left-right length of the interval from the left edge ofthe display portion 4 to the position of the cursor 41. The first valueindicates the left-right length of the interval from the left edge ofthe display portion 4 to the left edge of the selection image 46, whenthe selection image 46 is being displayed on the display portion 4. Thesecond value indicates the left-right length of the interval from theleft end (the start) of the character string 40 to the position of thecursor 41. The third value indicates the left-right length of thedisplay portion 4. The fourth value indicates the left-right length ofthe selection image 46. The first value, the third value, and the fourthvalue are specified by at least one of the size of the display portion 4and the size of the selection image 46. Therefore, the first value, thethird value, and the fourth value are fixed values. In contrast, thesecond value varies according to the number of the plurality of thecharacters 40A in the character string 40. The second value is thereforea variable value.

The subtraction value indicates the length of the interval between theleft edge of the selection image 46 when the selection image 46 is beingdisplayed on the display portion 4 and the position of the cursor 41 ina case where the character string 40 is being displayed on the displayportion 4 in order from its the left end (its start). In other words, ina case where the selection image 46 is being displayed on the displayportion 4, the subtraction value indicates the minimum amount ofmovement when the character string 40 is moved to the left in order toposition the cursor 41 to the left of the selection image 46. Thesubtraction value is computed by subtracting the first value from thesecond value. The specified value indicates a value that is determinedin advance. In the present embodiment, the specified value is 1.

The starting position offset indicates the position of the character 40Aat the left end of the portion of the character string 40 that is beingdisplayed on the display portion 4 in terms of its distance from theleft end (the start) of the entire character string 40. In a case wherethe selection image 46 is being displayed on the display portion 4, thefirst movement value is the actual amount of movement when the characterstring 40 and the cursor 41 are moved to the left in order to disposethe cursor 41 to the left of the selection image 46. The first movementamount is computed by adding the specified value to the subtractionvalue (subtraction value+specified value). Therefore, the first movementvalue is greater than the subtraction value by the amount of specifiedvalue. The second movement value is the actual amount of movement in acase where the character string 40 is moved to the right when theselection image 46 is switched from the displayed state to thenot-displayed state. The second movement value is computed bysubtracting the difference between the first value and the specifiedvalue from the second value (second value−(first value−specifiedvalue)). In a case where the value of the computation result isnegative, the second movement value is set to zero.

The RAM 404 stores the second value, the starting position offset, thefirst movement value, the second movement value (refer to FIG. 3), thesubtraction value, the character string buffer, and the cursor displayposition offset. The flash ROM 405 stores the first value, the thirdvalue, the fourth value, and the specified value.

The first main processing will be explained with reference to FIG. 4.The CPU 401 performs initialization by setting the character stringbuffer, the second value, and the cursor display position offset to zeroin the RAM 404 (Step S9). The CPU 401 determines whether the CPU 401detects an operation that presses an input key (one of a character key,a direction key, the Delete key, and the Backspace key) on the keyboard5 (Step S11). In a case where it is determined that an operation thatpresses an input key is not detected (NO at Step S11), the CPU 401returns the processing to Step S11. The CPU 401 continues to wait forthe pressing of an input key. In a case where it is determined that anoperation that presses an input key is detected (YES at Step S11), theCPU 401 performs the editing action that corresponds to the pressedinput key, performing the editing action on the one of the plurality ofthe characters 40A that is to one of the left and the right of theposition that is indicated by the second value in the character string40 that is stored in the character string buffer (Step S13). In a casewhere the CPU 401 performs the adding of a character 40A, the CPU 401updates the second value and the cursor display position offset byadding 1 to each of the second value and the cursor display positionoffset in order to move the cursor 41 one character's width to the right(Step S13). In a case where the CPU 401 performs the deleting of acharacter 40A according to the pressing of the Backspace key, the CPU401 updates the second value and the cursor display position offset bysubtracting 1 from each of the second value and the cursor displayposition offset in order to move the cursor 41 one character's width tothe left (Step S13).

For example, it is assumed that, in a state in which the plurality ofthe characters 40A “B”, “r”, “o”, “t”, “h”, and “e” of the characterstring 40 “Brothe” are stored in the character string buffer and thecursor display position offset is 6 (to the right of “e”), the CPU 401detects that the input key “r” is pressed. In this case, the character40A “r” is stored in the character string buffer, changing the characterstring 40 to “Brother”. The CPU 401 adds 1 to both the second value andthe cursor display position offset, updating the second value and thecursor display position offset from 6 to 7. In this state, in a casewhere the CPU 401 detects that the Backspace key is pressed, forexample, the CPU 401 deletes the character 40A “r” from the characterstring buffer, changing the character string 40 to “Brothe”. The CPU 401subtracts 1 from both the second value and the cursor display positionoffset, updating the second value and the cursor display position offsetfrom 7 to 6.

The CPU 401 determines whether the second value is equal to or greaterthan the third value (Step S15). In a case where the second value isequal to or greater than the third value, the position of the cursor 41is located to the right of the right edge of the display portion 4 whenthe entire character string 40 is displayed on the display portion 4,starting from its left end (the start). In a case where it is determinedthat the second value is equal to or greater than the third value (YESat Step S15), the CPU 401 computes the starting position offset bysubtracting the third value from the second value (second value-thirdvalue). The CPU 401 determines the position that is offset to the right(toward the end) from the left end (the start) of the character string40 that is stored in the character string buffer by the amount of thecomputed starting position offset, then sets that position as theposition within the character string 40 that is to be displayed at theleft edge of the display portion 4. The CPU 401 takes characters 40A inthe portion of the character string 40 that starts at the position setby the CPU 401, and displays those characters 40A left-justified on thedisplay portion 4 (Step S17). The CPU 401 updates the cursor displayposition offset by subtracting the starting position offset from thecursor display position offset. The CPU 401 displays the cursor 41 atthe position that is indicated by the updated cursor display positionoffset (Step S17). Before being updated, the cursor display positionoffset was equal to the second value, so the updated cursor displayposition offset becomes equal to the third value. Therefore, the cursor41 is displayed at the right edge of the display portion 4. The CPU 401advances the processing to Step S23.

On the other hand, in a case where the second value is less than thethird value, the position of the cursor 41 is located to the left of theright edge of the display portion 4 when the entire character string 40is displayed on the display portion 4, starting from its left end (thestart). In a case where it is determined that the second value is lessthan the third value (NO at Step S15), the CPU 401 sets the startingposition offset to zero in order to set the left end (the start) of thecharacter string 40 that is stored in the character string buffer as theposition within the character string 40 that is to be displayed at theleft edge of the display portion 4. The CPU 401 displays the characterstring 40 on the display portion 4 (Step S19). In this manner, theentire character string 40 that is stored in the character string bufferis displayed left-justified on the display portion 4, starting from thebeginning. The CPU 401 displays the cursor 41 in the position that isindicated by the cursor display position offset (Step S19). The CPU 401advances the processing to Step S23.

The CPU 401 determines whether the CPU 401 detects an operation thatpresses the Print key on the keyboard 5 (Step S23). In a case where itis determined that an operation that presses the Print key is notdetected (NO at Step S23), the CPU 401 returns the processing to StepS11. The CPU 401 continues to wait for the pressing of an input key. Ina case where it is determined that an operation that presses the Printkey on the keyboard 5 is detected (YES at Step S23), the CPU 401generates the printing data for printing the character string 40 that isstored in the character string buffer on the tape, according to theprinting conditions that are displayed in the second display area 4B,then stores the printing data in the flash ROM 405 (Step S25). Based onthe printing data that are stored in the flash ROM 405, the CPU 401prints the character string 40 on the cover film (Step S27). The CPU 401creates a label by sticking the base material tape onto the printedcover film. The CPU 401 then terminates the first main processing.

The second main processing will be explained with reference to FIG. 5.The CPU 401 determines whether the CPU 401 detects an operation thatpresses one of the Fn keys (Step S41). In a case where it is determinedthat an operation that presses one of the Fn keys is not detected (NO atStep S41), the CPU 401 returns the processing to Step S41. The CPU 401continues to wait for the pressing of one of the Fn keys. In a casewhere it is determined that an operation that presses one of the Fn keysis detected (YES at Step S41), the CPU 401 displays the selection image46 on the display portion 4 (Step S43). The CPU 401 advances theprocessing to Step S45.

The CPU 401 computes a threshold value by subtracting the specifiedvalue from the first value. The CPU 401 determines whether the secondvalue is equal to or greater than the threshold value (Step S45). In acase where the second value is equal to or greater than the thresholdvalue, when the selection image 46 is displayed on the display portion 4while the entire character string 40 continues to be displayed on thedisplay portion 4, the cursor 41 is displayed to the right of theposition that is one character's width to the left of the left edge ofthe selection image 46. In this case, the user is unable to check theposition of the cursor 41, as well as one of the adding position and thedeleting position that are indicated by the cursor 41. In a case whereit is determined that the second value is equal to or greater than thethreshold value (YES at Step S45), the CPU 401 performs the computationshereinafter described. The CPU 401 computes the subtraction value bysubtracting the first value from the second value. The CPU 401 computesthe first movement value by adding the specified value 1 to the computedsubtraction value. The CPU 401 moves the character string 40 and thecursor 41 that are displayed on the display portion 4 to the left by theamount of the first movement value (Step S47). The CPU 401 advances theprocessing to Step S49.

The processing at Step S47 will now be described in detail. The CPU 401updates the starting position offset by setting the starting positionoffset to the first movement value. The CPU 401 determines the positionthat is offset to the right (toward the end) from the left end (thestart) of the character string 40 that is stored in the character stringbuffer by the amount of the updated starting position offset, then setsthat position as the position within the character string 40 that is tobe displayed at the left edge of the display portion 4. The CPU 401takes characters 40A in the portion of the character string 40 thatstarts at the position that is set by the CPU 401 and displays thosecharacters 40A left-justified on the display portion 4 (Step S47). TheCPU 401 updates the cursor display position offset by subtracting thefirst value from the second value and using the result to set the cursordisplay position offset. The CPU 401 displays the cursor 41 in theposition that is indicated by the updated cursor display position offset(Step S47). The cursor 41 is displayed in the position that is onecharacter's width to the left of the left edge of the selection image46.

On the other hand, in a case where the second value is less than thethreshold value, when the selection image 46 is displayed on the displayportion 4 while the entire character string 40 continues to be displayedon the display portion 4, the cursor 41 is displayed in either theposition that is one character's width to the left of the left edge ofthe selection image 46 or a position to the left of the position that isone character's width to the left of the left edge of the selectionimage 46. In this case, the user is able to check the position of thecursor 41 in relation to the character string 40 and to check one of theadding position and the deleting position that is indicated by thecursor 41, even if the character string 40 that is displayed on thedisplay portion 4 is not moved to the left. In a case where it isdetermined that the second value is less than the threshold value (NO atStep S45), the CPU 401 advances the processing to Step S49.

The CPU 401 determines whether an operation is detected that selects oneof the menu images 461 to 464 in the selection image 46 that isdisplayed on the display portion 4 (Step S49). In a case where it isdetermined that an operation that selects one of the menu images 461 to464 is not detected (NO at Step S49), the CPU 401 advances theprocessing to Step S55. In a case where it is determined that anoperation that selects one of the menu images 461 to 464 is detected(YES at Step S49), the CPU 401 performs the processing that correspondsto the selected one of the menu images 461 to 464 (Steps S51, S53), ashereinafter described. The CPU 401 then advances the processing to StepS55.

The processing at Steps S51, S53 will be explained in detail. A case inwhich an operation that selects the menu image 461 (“Input Symbol”) isdetected will be used as an example. In this case, the CPU 401 adds asymbol with the width of one character to the right of the position, inthe character string 40 stored in the character string buffer, that isindicated by the second value (Step S51). The CPU 401 updates the secondvalue, the cursor display position offset, and the starting positionoffset by adding 1 to each of the second value, the cursor displayposition offset, and the starting position offset (Step S51). The CPU401 determines the position that is offset to the right (toward the end)from the left end (the start) of the character string 40 that is storedin the character string buffer by the amount of the updated startingposition offset, then sets that position as the position within thecharacter string 40 that is to be displayed at the left edge of thedisplay portion 4. The CPU 401 takes characters 40A in the portion ofthe character string 40 that starts at the position that is set by theCPU 401 and displays those characters 40A left-justified on the displayportion 4. In this case, the character string 40 that is displayed onthe display portion 4 is moved one character's width to the left (StepS53). The CPU 401 displays the cursor 41 in the position that isindicated by the updated cursor display position offset (Step S53). Theposition of the cursor 41 that is one character's width to the left ofthe left edge of the selection image 46 does not change.

A case in which an operation that selects the menu image 462 (“Input BarCode”) is detected will be used as an example. In this case, the CPU 401adds a bar code to the right of the position, in the character string 40stored in the character string buffer, that is indicated by the secondvalue (Step S51). The CPU 401 updates the second value, the cursordisplay position offset, and the starting position offset by adding aleft-right length Xa of the added bar code to each of the second value,the cursor display position offset, and the starting position offset(Step S51). The CPU 401 determines the position that is offset to theright (toward the end) from the left end (the start) of the characterstring 40 that is stored in the character string buffer by the amount ofthe updated starting position offset, then sets that position as theposition within the character string 40 that is to be displayed at theleft edge of the display portion 4. The CPU 401 takes characters 40A inthe portion of the character string 40 that starts at the position thatis set by the CPU 401 and displays those characters 40A left-justifiedon the display portion 4. In this case, the character string 40 that isdisplayed on the display portion 4 is moved to the left by the width ofXa characters (Step S53). The CPU 401 displays the cursor 41 in theposition that is indicated by the updated cursor display position offset(Step S53). The position of the cursor 41 that is one character's widthto the left of the left edge of the selection image 46 does not change.

A case in which an operation that selects the menu image 463 (“InputTab”) is detected will be used as an example. In this case, the CPU 401adds a tab to the right of the position, in the character string 40stored in the character string buffer, that is indicated by the secondvalue (Step S51). The CPU 401 updates the second value, the cursordisplay position offset, and the starting position offset by adding aleft-right length Ya of the added tab to each of the second value, thecursor display position offset, and the starting position offset (StepS51). The CPU 401 determines the position that is offset to the right(toward the end) from the left end (the start) of the character string40 that is stored in the character string buffer by the amount of theupdated starting position offset, then sets that position as theposition within the character string 40 that is to be displayed at theleft edge of the display portion 4. The CPU 401 takes characters 40A inthe portion of the character string 40 that starts at the position thatis set by the CPU 401 and displays those characters 40A left-justifiedon the display portion 4. In this case, the character string 40 that isdisplayed on the display portion 4 is moved to the left by the width ofYa characters (Step S53). The CPU 401 displays the cursor 41 in theposition that is indicated by the updated cursor display position offset(Step S53). The position of the cursor 41 that is one character's widthto the left of the left edge of the selection image 46 does not change.

A case in which an operation that selects the menu image 464 (“Delete”)is detected will be used as an example. In this case, the CPU 401deletes the character to the left of the position, in the characterstring 40 stored in the character string buffer, that is indicated bythe second value (Step S51). The CPU 401 updates the second value, thecursor display position offset, and the starting position offset bysubtracting 1 from each of the second value, the cursor display positionoffset, and the starting position offset (Step S51). The CPU 401determines the position that is offset to the right (toward the end)from the left end (the start) of the character string 40 that is storedin the character string buffer by the amount of the updated startingposition offset, then sets that position as the position within thecharacter string 40 that is to be displayed at the left edge of thedisplay portion 4. The CPU 401 takes characters 40A in the portion ofthe character string 40 that starts at the position that is set by theCPU 401 and displays those characters 40A left-justified on the displayportion 4. In this case, the character string 40 that is displayed onthe display portion 4 is moved one character's width to the right (StepS53). The position of the cursor 41 that is one character's width to theleft of the left edge of the selection image 46 does not change.

The CPU 401 determines whether an operation is detected that presses oneof the Fn keys again (Step S55). In a case where it is determined thatan operation that presses one of the Fn keys is not detected (NO at StepS55), the CPU 401 returns the processing to Step S49. The CPU 401continues to wait for an operation that selects one of the menu images461 to 464. In a case where it is determined that an operation thatpresses one of the Fn keys is detected (YES at Step S55), the CPU 401deletes the selection image 46 that is displayed on the display portion4 (Step S57). The CPU 401 subtracts 1 as the specified value from thefirst value, then subtracts the result from the second value in order tocompute the second movement value. In a case where the second movementvalue is a negative value, the second movement value is set to zero. TheCPU 401 moves the character string 40 and the cursor 41 that aredisplayed on the display portion 4 to the right by the amount of thecomputed second movement value (Step S59).

The processing at Step S59 will now be described in detail. The CPU 401updates the starting position offset and the cursor display positionoffset by subtracting the second movement value from each of thestarting position offset and the cursor display position offset. The CPU401 determines the position that is offset to the right (toward the end)from the left end (the start) of the character string 40 that is storedin the character string buffer by the amount of the updated startingposition offset, then sets that position as the position within thecharacter string 40 that is to be displayed at the left edge of thedisplay portion 4. The CPU 401 takes characters 40A in the portion ofthe character string 40 that starts at the position that is set by theCPU 401 and displays those characters 40A left-justified on the displayportion 4 (Step S59). The CPU 401 displays the cursor 41 in the positionthat is indicated by the updated cursor display position offset (StepS59). The CPU 401 advances the processing to Step S61.

The CPU 401 determines whether the processing at Step S27 in the firstmain processing (refer to FIG. 4) is performed and printing is done(Step S61). In a case where it is determined that printing is notperformed (NO at Step S61), the CPU 401 returns the processing to StepS41. The CPU 401 continues to wait for the pressing of one of the Fnkeys. In a case where it is determined that printing is performed (YESat Step S61), the CPU 401 terminates the second main processing.

As explained above, in the first embodiment, the CPU 401 of the printer1 displays the selection image 46 to the right of the center, in theleft-right direction, of the display portion 4 (Step S43). In this case,the CPU 401 moves the character string 40 and the cursor 41 to the leftuntil the cursor 41 is displayed in a position that is to the left ofthe left edge of the selection image 46 by the width of one character(the specified value) (Step S47). This makes it possible to prevent thecursor 41 from not being displayed due to the displaying of theselection image 46. Therefore, the user is able to edit the characterstring 40 while properly recognizing one of the adding position and thedeleting position that is indicated by the cursor 41 within thecharacter string 40. Moreover, by causing the printer 1 to perform theprinting of the edited character string 40 on the tape (the cover film),the user can cause the printer 1 to create a label on which the editedcharacter string 40 is printed.

In accordance with the relationship between the second value and thethreshold value that is computed by subtracting 1 as the specified valuefrom the first value, the CPU 401 determines whether the cursor 41ceases to be displayed due to the displaying of the selection image 46(Step S45). Therefore, the CPU 401 can easily determine whether the useris able to recognize one of the adding position and the deletingposition that is indicated by the cursor 41 within the character string40 after the selection image 46 is displayed. The CPU 401 can thereforeproperly determine whether it is necessary to move the character string40 to the left.

In a case where the selection image 46 is displayed on the displayportion 4, the CPU 401 moves the character string 40 and the cursor 41to the left until the cursor 41 is displayed to the left of the leftedge of the selection image 46 by the width of one character (thespecified value) (Step S47). Therefore, the user is able to perform theediting of the character string 40 while easily recognizing not only theposition of the cursor 41 in relation to the character string 40, butalso one of the adding position (on the right side of the cursor 41) andthe deleting position (on one of the left side and the right side of thecursor 41) within the character string 40.

In a case where it is determined that an operation that selects one ofthe menu images 461 to 464 in the selection image 46 is detected (YES atStep S49), the CPU 401 edits the character string 40 with the editingaction that corresponds to the selected one of the menu images 461 to464 (Steps S51). After doing the editing, the CPU 401 moves thecharacter string 40 and the cursor 41 to one of the left and the rightuntil the cursor 41 is displayed to the left of the left edge of theselection image 46 by the width of one character (the specified value)(Step S53). Thus, after the character string 40 is edited in accordancewith the selecting of the one of the menu images 461 to 464, the CPU 401is able to prevent the cursor 41 from not being displayed due to theselection image 46.

An edit screen 200 (edit screens 200A to 200D) according to a secondembodiment will be explained with reference to FIG. 7. The edit screen200A is displayed on the display portion 4 in a case where an operationis input through the keyboard 5 to start editing of a character stringthat is to be printed on the tape. The edit screen 200 includes a firstarea 50 and a second area 60. The first area 50 is the area above thecenter, in the up-down direction, of the display portion 4. The secondarea 60 is the area below the center, in the up-down direction, of thedisplay portion 4.

The first area 50 is an area in which a print image 51 is displayed. Theprint image 51 is an image of a label that is to be created by printinga plurality of character strings on the cover film. The print image 51contains three blocks 51A, 51B, 51C, which are arrangedtwo-dimensionally. The block 51A is disposed in the center, in theleft-right direction, of an upper tier of the print image 51. The block51B is disposed on the left side of a lower tier of the print image 51.The block 51C is disposed on the right side of the lower tier of theprint image 51. The blocks 51A, 51B, and 51C are horizontally extendingrectangles that indicate the respective positions of the plurality ofthe character strings that is to be printed on the cover film. In theexample that is shown in FIG. 7, the blocks 51A and 51B are rectanglesthat are indicated by broken lines. The block 51C is a rectangle that isindicated by solid lines. The block 51C that is indicated by the solidlines is a block that is in a state of having been selected by the useras the block that corresponds to a character string 62 that is displayedin the second area 60, which will be described below. Hereinafter, theblock (the block 51C) that is indicated by the solid lines (that is, hasbeen selected by the user) is called the selected block (the selectedblock 51C). “Brother indust”, which is the same as the character string62 that is shown in the second area 60, is displayed inside the selectedblock 51C. The blocks 51A and 51B that are indicated by the broken linesare blocks that are in a state of not having been selected by the user,that is, blocks that are other than the selected block. The characterstrings “Label 1-1” and “Identifier A-1”, which indicate the names ofthe respective blocks, are displayed inside the blocks 51A and 51B,respectively.

The second area 60 is an area for editing the character string 62 thatcorresponds to the block that has been selected by the user, that is,the selected block 51C that is indicated by the solid lines in the firstarea 50. The second area 60 includes an input frame 61. The input frame61 is a rectangle whose long axis extends horizontally. The characterstring 62 and a cursor 63 are displayed inside the input frame 61. Themaximum number of lines of the character string 62 that can be displayedin the input frame 61 is one. The character string 62 includes aplurality of characters 62A. The plurality of the characters 62A arearrayed in the left-right direction. The maximum number of thecharacters 62A that can be displayed in the input frame 61 is twenty.The character string 62 is displayed left-justified. The cursor 63 is amark that indicates the position that is being edited when the characterstring 62 is edited. The cursor 63 is a straight line segment thatextends vertically. The vertical length of the cursor 63 isapproximately equal to the vertical length of each one of the pluralityof the characters 62A. The cursor 63 blinks at regular intervals. Thecursor 63 is positioned to one of the left and the right of one of theplurality of the characters 62A.

In a case where a character key on the keyboard 5 is pressed, forexample, the character that corresponds to the pressed character key isadded to the character string 62 at the position to the right of thecursor 63 and displayed. In this case, the position to the right of thecursor 63 is specified as an adding position where the character isadded. In a case where a character is added at the adding position, thecursor 63 is moved to the right side of the added character. In a casewhere the Delete key on the keyboard 5 is pressed, for example, the oneof the plurality of the characters 62A that is to the right of thecursor 63 is deleted from the character string 62. In this case, theposition to the right of the cursor 63 is specified as a deletingposition where the character 62A is deleted. In a case where a character62A is deleted by the pressing of the Delete key, the cursor 63 is notmoved. In a case where the Backspace key on the keyboard 5 is pressed,for example, the one of the plurality of the characters 62A that is tothe left of the cursor 63 is deleted from the character string 62. Inthis case, the position to the left of the cursor 63 is specified as thedeleting position where the character is deleted. In a case where acharacter is deleted by the pressing of the Backspace key, the cursor 63is moved to the right side of the character 62A that is positioned onthe left side of the deleted character 62A. The cursor 63 thereforemakes it possible for the user to recognize the position (one of theadding position and the deleting position) where the character string 62is being edited. The cursor 63 is moved to one of the left and the rightin response to the pressing of the direction keys on the keyboard 5. Ina case where the character string 62 is edited as described above, theedited character string is displayed inside the corresponding selectedblock 51C.

As described previously, the size of the printer 1 is smaller than thatof a stationary printer, and the resolution of the display portion 4 islower. Therefore, as described previously, the number of lines of thecharacter string 62 that can be displayed in the input frame 61 at onetime and the number of the plurality of the characters 62A arerestricted. Therefore, in a case where the total number of the pluralityof the characters 62A in the character string 62 is greater than themaximum number of characters (twenty characters), the CPU 401 is notable to display all of the plurality of the characters 62A in thecharacter string 62 in the input frame 61 at one time. In that case, theCPU 401 moves (scrolls) the character string 62 to the left, such thatthe cursor 63 is constantly displayed in the input frame 61.

The shape of the cursor 63 and the locations of the adding position andthe deleting position in relation to the cursor 63 are not limited tothe examples described above. For example, the shape of the cursor 63may be a rectangle of a size that is able to cover any one of theplurality of the characters 62A. In that case, among the plurality ofthe characters 62A of the character string 62, the cursor 63 can bedisposed to the left of the leftmost (first) character 62A, to the rightof the rightmost (last) character 62A, and at the position of any one ofthe plurality of the characters 62A. In that case, the position of thecursor 63 may be specified as the adding position and the deletingposition.

In a case where one of the Fn keys on the keyboard 5 is pressed, theedit screen 200B, an example of which is shown in FIG. 7, is displayed.In a case where one of the Fn keys is pressed, a selection image 71 isdisplayed on the display portion 4, to the right of the center, in theleft-right direction, of the first area 50 and the second area 60.Hereinafter, the area within the first area 50 and the second area 60where the selection image 71 is displayed is called the third area 70.The portion of the first area 50 not covered by the third area 70 iscalled the first residual area 50A. The portion of the second area 60not covered by the third area 70 is called the second residual area 60A.

The overall shape of the selection image 71 is a rectangle whose longaxis extends horizontally. The horizontal length of the selection image71 is less than half of the horizontal length of the display portion 4.The left edge of the selection image 71 is positioned to the right ofthe center of the display portion 4. The right edge of the selectionimage 71 is positioned to the left of the right edge of the displayportion 4. The selection image 71 is given priority for display over theprint image 51 and the input frame 61. Therefore, in a case where theselection image 71 is displayed such that the print image 51 and theinput frame 61 overlap with the selection image 71, priority is given todisplaying the selection image 71 in the area of overlap, and the printimage 51 and the input frame 61 are not displayed in that area.

The selection image 71 is partitioned into menu images 701, 702, 703,and 704, in which characters that describe the plurality of the editingactions, “Input Symbol”, “Input Bar Code”, “Input Tab”, and “Delete”,are respectively displayed. The menu images 701 to 704 are arrayed inthe up-down direction. In a case where a selection operation in whichthe position of one of the menu images 701 to 704 in the selection image71 is touched is detected through the touch panel 7, the CPU 401 editsthe character string 62 with the corresponding editing action.

The menu image 701 (“Input Symbol”) corresponds to an editing actionthat adds to the character string 62 a symbol that is not included onthe keyboard 5. In a case where a selection operation in which the menuimage 701 is touched is detected through the touch panel 7, the CPU 401displays in the menu image 701 a list of a plurality of symbols that canbe added, instead of displaying the characters “Input Symbol”. In a casewhere a selection operation in which the position of one of theplurality of the symbols is touched is detected through the touch panel7, the CPU 401 adds the corresponding symbol to the character string 62in the adding position to the right of the cursor 63 and displays thesymbol.

The menu image 702 (“Input Bar Code”) corresponds to an editing actionthat adds a bar code to the character string 62. In a case where aselection operation in which the menu image 702 is touched is detectedthrough the touch panel 7, the CPU 401 displays in the menu image 702 aninput screen through which a plurality of numerals can be input, insteadof displaying the characters “Input Bar Code”. In a case where anoperation by which a plurality of numerals have been input is detectedthrough the keyboard 5, the CPU 401 creates a bar code that indicatesthe detected numerals. The CPU 401 adds the created bar code to thecharacter string 62 in the adding position to the right of the cursor 63and displays the bar code.

The menu image 703 (“Input Tab”) corresponds to an editing action thatinputs a tab. In a case where a selection operation in which the menuimage 703 is touched is detected through the touch panel 7, the CPU 401adds a tab to the character string 62 in the adding position to theright of the cursor 63 and displays the tab.

The menu image 704 (“Delete”) corresponds to an editing action thatdeletes one of the plurality of the characters 62A from the characterstring 62. In a case where a selection operation in which the menu image704 is touched is detected through the touch panel 7, the CPU 401deletes from the character string 62 the character 62A that is in thedeleting position to the left of the cursor 63. The editing action bythe menu image 704 (“Delete”) is the same as the editing action in acase where the Backspace key is pressed on the keyboard 5.

A menu image other than those described above may be included in theselection image 71. A scroll bar may be provided in the selection image71, such that any one of a plurality of menu images is selectivelydisplayed.

A case in which one of the Fn keys is pressed and the selection image 71is displayed while the edit screen 200A is being displayed is used as anexample. On the edit screen 200A, the position of the selected block 51Cof the print image 51 in the first area 50 is to the right of thecenter, in the left-right direction, of the display portion 4. Thecharacter string 62 “Brother indust” is displayed inside the input frame61 in the second area 60. The cursor 63 is displayed to the right of thelast character 62A “t” of the character string 62. The position of thecursor 63 is to the right of the center, in the left-right direction, ofthe display portion 4. It is assumed that the selection image 71 isdisplayed while the states of the first area 50 and the second area 60in the edit screen 200A are maintained. In that case, the selectionimage 71 overlaps the cursor 63 and portions of the selected block 51Cand the character string 62. In that case, the cursor 63 and theoverlapped portions of the selected block 51C and the character string62 are not displayed due to the selection image 71.

In contrast, as shown in the edit screen 200B, the CPU 401 moves theprint image 51 to the left (the arrow 81) to a position where theselected block 51C is not overlapped by the displayed selection image71, or in other words, until the entire selected block 51C is positionedinside the first residual area 50A. The user is therefore able to checkthe position of the selected block 51C within the print image 51, aswell as the character string that is displayed inside the selected block51C, even after the selection image 71 is displayed. Furthermore, whenthe character string 62 is displayed left-justified inside the inputframe 61, the CPU 401 reduces the character string 62 such that thecursor 63 is not overlapped by the selection image 71. Specifically, theCPU 401 first computes, by a method that will be described below, areduction ratio that satisfies the condition that the cursor 63 is notoverlapped by the selection image 71. Next, the CPU 401 reduces thecharacter string 62 based on the computed reduction ratio. The reducedcharacter string 62 fits within the input frame 61 in the secondresidual area 60A. The user is therefore able to recognize the characterstring 62 and the position of the cursor 63 in relation to the characterstring 62, even after the selection image 71 is displayed. Accordingly,by selecting one of the menu images 701 to 704 in the selection image71, the user can easily perform editing of the character string 62 whilelooking at the selected block 51C and the character string 62 inside theinput frame 61.

A case in which an operation that selects the menu image 703 (“InputTab”) in the selection image 71 is performed while the edit screen 200Bis being displayed is used as an example. In this case, the CPU 401first adds a tab to the character string 62 inside the input frame 61 inthe adding position, then moves the cursor 63 to the right side of theadded tab. Next, as shown in the edit screen 200C, when the characterstring 62 to which the tab is added is displayed left-justified insidethe input frame 61, the CPU 401 computes a reduction ratio such that thecursor 63 is not be overlapped by the selection image 71, then reducesthe character string 62 further. The reduced character string 62 isdisplayed inside the input frame 61 in the second residual area 60A. Theuser is therefore able to continue checking the position of the cursor63 in relation to the character string 62, even after the menu image 703in the selection image 71 is selected and the character string 62 isedited. In cases in which operations that select the menu image 701(“Input Symbol”) and the menu image 702 (“Input Bar Code”) areperformed, the CPU 401 also computes a reduction ratio such that thecursor 63 is not overlapped by the selection image 71, then reduces thecharacter string 62 further when the edited character string 62 isdisplayed left-justified inside the input frame 61 in the secondresidual area 60A, although these cases will not be explained in detail.The user is therefore able to continue recognizing the character string62 and the cursor 63, even after the character string 62 is edited inaccordance with an editing action that corresponds to one of the menuimages 701 to 703.

The method for displaying the print image 51 is not specificallylimited. For example, the CPU 401 may reduce the character string suchthat the entire character string edited in accordance with an operationthat selects one of the menu images 701 to 703 in the selection image 71fits inside the selected block 51C. The CPU 401 may, for example, extendthe left-right length of the selected block 51C such that the entirecharacter string edited in accordance with an operation that selects oneof the menu images 701 to 703 in the selection image 71 fits inside theselected block 51C. In a case where the CPU 401 extends the left-rightlength of the selected block 51C, the CPU 401 may move the print image51 to the left until the selected block 51C is not overlapped by theselection image 71.

A case in which an operation that selects the menu image 704 (“Delete”)in the selection image 71 is performed while the edit screen 200C isbeing displayed is used as an example. In this case, the CPU 401 firstdeletes the tab in the deleting position to the left of the cursor 63 inthe character string 62, then moves the cursor 63 to the right side ofthe character 62A “t” that was to the left of the deleted tab. Next, theCPU 401 restores to its original, pre-reduction size the characterstring 62 that was reduced when the tab was added by the selecting ofthe menu image 703 (“Input Tab”). That causes the edit screen 200C torevert to the edit screen 200B.

In contrast, a case in which an operation that selects the menu image703 (“Input Tab”) in the selection image 71 is performed again while theedit screen 200C is being displayed is used as an example. In this case,the CPU 401 first adds a tab to the character string 62 inside the inputframe 61 in the adding position, then moves the cursor 63 to the rightside of the added tab. Next, when the character string 62 to which thetab has been added is displayed left-justified inside the input frame61, the CPU 401 computes a reduction ratio such that the cursor 63 isnot overlapped by the selection image 71. At this point, if the computedreduction ratio is less than a specified reduction ratio (a thresholdvalue T, described below), the CPU 401 reduces the character string 62by the specified reduction ratio. In this case, the specified reductionratio is greater than the computed reduction ratio. Therefore, in a casewhere the reduced character string 62 is displayed left-justified in theinput frame 61, the cursor 63 and the selection image 71 overlaps. Inthat case, the selection image 71 prevents the cursor 63 from beingdisplayed.

Accordingly, as shown in the edit screen 200D, the CPU 401 moves thecursor 63 and the character string 62 that has been reduced by thespecified reduction ratio to the left (the arrow 82) until the cursor 63is disposed at a position that is to the left of the left edge of thedisplayed selection image 71, or in other words, until the cursor 63 isdisposed inside the input frame 61 in the second residual area 60A. Thismakes it possible for the user to continue checking the position of thecursor 63 in relation to the character string 62, even after the menuimage 703 in the selection image 71 is selected and the character string62 is edited. The reduced character string 62 and the cursor 63 aredisplayed in the input frame 61 at the specified reduction ratio. It istherefore possible to inhibit the character string 62 from being madehard to see due to its being reduced.

In a case where one of the Fn keys is pressed again while one of theedit screens 200B to 200D is being displayed, the selection image 71 isdeleted, and the edit screen 200 reverts to the original edit screen200A. Furthermore, in a case where the Print key on the keyboard 5 ispressed while one of the edit screens 200A to 200D is being displayed,the CPU 401 generates the printing data for printing the print image 51on the cover film. The CPU 401 creates a label by printing the printimage 51 on the cover film based on the generated printing data.

The specific processing that the CPU 401 performs in the secondembodiment in order to implement an editing operation on the characterstring 62 that are described above will be explained. Programs for thirdmain processing (refer to FIG. 8) and fourth main processing (refer toFIGS. 9 and 10) are stored in the ROM 402. The third main processing andthe fourth main processing are started by the CPU 401′s executing of theprograms that are stored in the ROM 402 when an operation for startingthe editing of the character string 62 is performed through the keyboard5. The third main processing corresponds to the editing processing ofthe character string 62 that is performed when a character key on thekeyboard 5 is pressed. The fourth main processing corresponds to theediting processing of the character string 62 that is performed when oneof the menu images 701 to 704 (refer to FIG. 7) in the selection image71 is selected. The third main processing and the fourth main processingare performed in parallel.

In the second embodiment, the plurality of the characters 62A in thecharacter string 62 that is displayed in the input frame 61 are allfull-width characters of a specified font size (hereinafter called theinitial size P) and are displayed at a size that is 5 millimeters wide,for example.

Variables (a first character count and a second character count) thatare used in the third main processing and the fourth main processingwill be explained. The first character count indicates the number ofcharacters of the initial size P that can be displayed in the inputframe 61 while the selection image 71 is not being displayed. The secondcharacter count indicates the number of characters of the initial size Pthat can be displayed in the portion of the input frame 61 that is notoverlapped by the selection image 71, or in other words, in the inputframe 61 in the second residual area 60A, while the selection image 71is being displayed. The first character count and the second charactercount are stored in the ROM 402.

A first buffer, a second buffer, a first cursor position offset, and asecond cursor position offset that are used when the third mainprocessing and the fourth main processing are performed by the CPU 401will be explained. The plurality of the characters 62A of the characterstring 62 (refer to FIG. 7) are stored in order in the first buffer inresponse to one of the pressing of a character key on the keyboard 5 andthe selecting of one of the menu images 701 to 704 in the selectionimage 71. The plurality of the characters 62A include a symbol, a barcode, and a tab. Among the plurality of the characters 62A in thecharacter string 62 that is stored in the first buffer, the plurality ofthe characters 62A that are displayed in the input frame 61 are storedin the second buffer. The first cursor position offset indicates thelength of the interval from the left edge (the start) of the characterstring 62 to the position of the cursor 63 in terms of a number ofcharacters. The second cursor position offset indicates the displayposition of the cursor 63 in terms of the number of characters from theleft edge of the input frame 61 to the position of the cursor 63. Thefirst buffer, the second buffer, the first cursor position offset, andthe second cursor position offset are stored in the RAM 404. When theCPU 401 starts the third main processing and the fourth main processing,the CPU 401 initializes the first buffer, the second buffer, the firstcursor position offset, and the second cursor position offset by settingeach of the first buffer, the second buffer, the first cursor positionoffset, and the second cursor position offset to zero.

The third main processing will be explained with reference to FIG. 8.The CPU 401 displays the print image 51 (refer to FIG. 7) in the firstarea 50 of the display portion 4 and displays the input frame 61 (referto FIG. 7) in the second area 60 (Step S111). The CPU 401 determineswhether a selection operation in which the position of one of the blocks51A to 51C in the displayed print image 51 is touched is detectedthrough the touch panel 7 (Step S113). In a case where it is determinedthat a selection operation is not detected (NO at Step S113), the CPU401 advances the processing to Step S129.

In a case where it is determined that a selection operation is detected(YES at Step S113), the CPU 401 takes the block that has been selected(for example, the block 51C) and stores the block in the RAM 404 as theselected block (the selected block 51C). The CPU 401 changes the brokenline rectangle that indicates the selected block 51C to a solid linerectangle. The CPU 401 determines whether the CPU 401 detects anoperation that presses an input key (one of a character key, a directionkey, the Delete key, and the Backspace key) on the keyboard 5 (StepS115). In a case where it is determined that an operation that pressesan input key is not detected (NO at Step S115), the CPU 401 determineswhether an operation is detected through the touch panel 7 in which theblock 51C detected at Step S113 is pressed again (Step S121). In a casewhere it is determined that an operation in which the block 51C ispressed is not detected (NO at Step S121), the CPU 401 returns theprocessing to Step S115. In a case where it is determined that anoperation in which the block 51C is pressed is detected (YES at StepS121), the CPU 401 takes the selected block 51C that is indicated by asolid line rectangle and changes the selected block 51C back to theoriginal broken line rectangle. The selecting of the block is thuscanceled. The CPU 401 returns the processing to Step S113.

In a case where it is determined that an operation that presses an inputkey is detected (YES at Step S115), the CPU 401 performs the editingaction that corresponds to the pressed input key, performing the editingaction at a position in the first buffer that is to one of the left andthe right of the position that is indicated by the first cursor positionoffset (Step S117). In a case where the CPU 401 performs the adding of acharacter 62A, the CPU 401 updates the first cursor position offset andthe second cursor position offset by adding 1 to each of the firstcursor position offset and the second cursor position offset in order tomove the cursor 63 one character's width to the right (Step S119). In acase where the CPU 401 performs the deleting of a character 62Aaccording to the pressing of the Backspace key, the CPU 401 updates thefirst cursor position offset and the second cursor position offset bysubtracting 1 from each of the first cursor position offset and thesecond cursor position offset in order to move the cursor 63 onecharacter's width to the left (Step S119).

For example, in a state in which the plurality of the characters 62A“B”, “r”, “o”, “t”, “h”, and “e” of the character string 62 “Brothe” arestored in the first buffer and the first cursor position offset and thesecond cursor position offset are both 6 (to the right of “e”), it isassumed that the CPU 401 detects that the input key “r” is pressed. Inthis case, the character 62A “r” is stored in the first buffer, changingthe character string 62 to “Brother”. The CPU 401 adds 1 to both thefirst cursor position offset and the second cursor position offset,updating the first cursor position offset and the second cursor positionoffset from 6 to 7. In this state, in a case where the CPU 401 detectsthat the Backspace key is pressed, for example, the CPU 401 deletes thecharacter 62A “r” from the first buffer, changing the character string62 to “Brothe”. The CPU 401 subtracts 1 from both the first cursorposition offset and the second cursor position offset, updating thefirst cursor position offset and the second cursor position offset from7 to 6.

The CPU 401 determines whether the first cursor position offset is equalto or greater than the first character count (Step S123). It is assumedthat, in a case where the first cursor position offset is equal to orgreater than the first character count, the entire character string 62is displayed in the input frame 61, starting from its left end (thestart). In that case, the position of the cursor 63 is located to theright of the right edge of the input frame 61. In a case where it isdetermined that the first cursor position offset is equal to or greaterthan the first character count (YES at Step S123), the CPU 401 looks atthe characters 62A in the character string 62 that is stored in thefirst buffer, and starting at the character 62A that is offset from theleft end of the character string 62 by the amount of the first cursorposition offset, counts back toward the left end (the start) of thecharacter string 62 by a number of the characters 62A that is equal tothe first character count, then stores those characters 62A in thesecond buffer. The CPU 401 displays left-justified in the input frame 61the characters 62A that are stored in the second buffer (Step S125). TheCPU 401 updates the second cursor position offset by setting the secondcursor position offset to the value of the first character count, thendisplays the cursor 63 at the position that is indicated by the secondcursor position offset (Step S125). The cursor 63 is displayed at theright edge of the input frame 61. The CPU 401 displays the characterstring 62 that is stored in the first buffer in the selected block 51Cof the print image 51 that is displayed in the first area 50. The CPU401 advances the processing to Step S129.

In contrast, it is assumed that the entire character string 62 isdisplayed in the input frame 61, starting from its left end (the start),in a case where the first cursor position offset is less than the firstcharacter count. In that case, the position of the cursor 63 is to theleft of the right edge of the input frame 61. In a case where it isdetermined that the first cursor position offset is less than the firstcharacter count (NO at Step S123), the CPU 401 stores in the secondbuffer a number of the characters 62A that is equal to the maximum firstcharacter count, the characters 62A being counted from the start of thecharacter string 62 that is stored in the first buffer. The CPU 401displays left-justified in the input frame 61 the characters 62A thatare stored in the second buffer (Step S127). In this way, the characterstring 62 that is stored in the first buffer is displayed left-justifiedin the input frame 61, starting from the beginning of the characterstring 62. The CPU 401 displays the cursor 63 in the position that isindicated by the second cursor position offset (Step S127). The CPU 401displays the character string 62 that is stored in the first buffer inthe selected block 51C of the print image 51 that is displayed in thefirst area 50. The CPU 401 advances the processing to Step S129.

The CPU 401 determines whether the CPU 401 detects an operation thatpresses the Print key on the keyboard 5 (Step S129). In a case where itis determined that an operation that presses the Print key is notdetected (NO at Step S129), the CPU 401 returns the processing to StepS113. The CPU 401 continues to wait for the pressing of an input key. Ina case where it is determined that an operation that presses the Printkey on the keyboard 5 is detected (YES at Step S129), the CPU 401generates the printing data for printing the character string 62 that isstored in the first buffer on the cover film, then stores the printingdata in the flash ROM 405 (Step S131). Based on the printing data thatare stored in the flash ROM 405, the CPU 401 prints the character string62 on the cover film (Step S133). The CPU 401 creates a label bysticking the base material tape onto the printed cover film. The CPU 401then terminates the third main processing.

The fourth main processing will be explained with reference to FIG. 9.The CPU 401 determines whether the CPU 401 detects an operation thatpresses one of the Fn keys (Step S141). In a case where it is determinedthat an operation that presses one of the Fn keys is not detected (NO atStep S141), the CPU 401 returns the processing to Step S141. The CPU 401continues to wait for the pressing of one of the Fn keys. In a casewhere it is determined that an operation that presses one of the Fn keysis detected (YES at Step S141), the CPU 401 displays the selection image71 in the third area 70 (Step S143). The CPU 401 advances the processingto Step S145.

The CPU 401 determines whether the displayed selection image 71 overlapsthe selected block 51C of the print image 51 that is displayed in thefirst area 50 (Step S145). In a case where it is determined that theselection image 71 does not overlap the selected block 51C (NO at StepS145), the CPU 401 advances the processing to Step S149.

In a case where it is determined that the selection image 71 doesoverlap the selected block 51C (YES at Step S145), the CPU 401 moves theprint image 51 to the left such that the selected block 51C is notoverlapped by the selection image 71 (Step S147). Specifically, the CPU401 moves the print image 51 to the left until the entire selected block51C is disposed in an area within the first area 50 that is notoverlapped by the third area 70 where the selection image 71 isdisplayed, that is, in the first residual area 50A (Step S147). The CPU401 displays the moved print image 51 (Step S148). The CPU 401 advancesthe processing to Step S149.

The CPU 401 determines whether the second cursor position offset isgreater than the second character count. It is assumed that, in a casewhere the second cursor position offset is greater than the secondcharacter count, the selection image 71 is displayed in the third area70 while the entire character string 62 that is stored in the secondbuffer is being displayed in the input frame 61. In that case, thecursor 63 is overlapped by the selection image 71. Therefore, the usercannot check the position of the cursor 63.

In a case where it is determined that the second cursor position offsetis greater than the second character count (YES at Step S149), the CPU401 computes a reduction ratio S (Step S151). The reduction ratio S is aparameter by which the font size is multiplied in order to reduce thesize of the characters 62A from the start of the character string 62that is stored in the second buffer to the position of the cursor 63.Specifically, the CPU 401 computes the reduction ratio S by dividing thesecond character count by the second cursor position offset. Thecomputed reduction ratio S is multiplied times a length L1 in order tomake the length L1 no greater than a length L2, the length L1 being thehorizontal length from the start of the character string 62 that isstored in the second buffer to the position of the cursor 63 when thecharacters are displayed at the initial size P, and the length L2 beingthe horizontal length when a number of characters that is equal to thesecond character count are displayed at the initial size P.

The CPU 401 stores the computed reduction ratio S in the RAM 404. In acase where the second cursor position offset is 18 and the secondcharacter count is 15, for example, the reduction ratio S is computed as15/18=0.83. The CPU 401 determines whether the computed reduction ratioS is less than the specified threshold value T (for example, 0.75) (StepS153). In a case where it is determined that the reduction ratio S isnot less than the specified threshold value T (NO at Step S153), the CPU401 changes (reduces) the font size of the characters 62A of thecharacter string 62 that is stored in the second buffer to the size thatis computed by multiplying the initial size P by the reduction ratio S(Step S157). The CPU 401 displays left-justified in the input frame 61the character string 62 in which the font size of the characters 62A isreduced based on the reduction ratio S (Step S158). The CPU 401 displaysthe cursor 63 in the position that is indicated by the second cursorposition offset (Step S158). The CPU 401 advances the processing to StepS161 (refer to FIG. 10). When the processing that is described above isperformed, the cursor 63 is displayed in the input frame 61 at aposition that is close to the selection image 71. The user is thereforeable to check the position of the cursor 63 in relation to the characterstring 62.

In a case where it is determined that the reduction ratio S is less thanthe specified threshold value T (YES at Step S153), the CPU 401 changes(reduces) the font size of the characters 62A of the character string 62that is stored in the second buffer to the size that is computed bymultiplying the initial size P by the threshold value T (for example,0.75) (Step S155). The CPU 401 computes an offset count C. The offsetcount C is the number of the characters 62A that are overlapped by theselection image 71 when the character string 62 reduced based on thethreshold value T is displayed left-justified in the input frame 61. TheCPU 401 displays the character string 62 reduced based on the thresholdvalue T left-justified in the input frame 61, starting from thecharacter 62A that is offset from the start of the character string 62by the offset count C (Step S156). The CPU 401 updates the second cursorposition offset by subtracting the offset count C from the second cursorposition offset, then displays the cursor 63 in the position that isindicated by the updated second cursor position offset (Step S156).Thus, in a case where the left-right length from the start of thecharacter string 62 reduced based on the threshold value T to theposition of the cursor 63 does not fit inside the input frame 61 in thesecond residual area 60A, the CPU 401 is able to shift the reducedcharacter string 62 to the left by number of characters that isindicated by the offset count C and to display the shifted characterstring 62 in the input frame 61. The CPU 401 advances the processing toStep S161 (refer to FIG. 10). When the processing that is describedabove is performed, the cursor 63 is displayed in the input frame 61 ata position that is close to the selection image 71. The user istherefore able to check the position of the cursor 63 in relation to thecharacter string 62.

As shown in FIG. 10, the CPU 401 determines whether an operation isdetected that selects one of the menu images 701 to 704 in the selectionimage 71 that is displayed on the display portion 4 (Step S161). In acase where it is determined that an operation that selects one of themenu images 701 to 704 is detected (YES at Step S161), the CPU 401performs the processing that corresponds to the selected one of the menuimages 701 to 704 (Steps S169, S171), as hereinafter described.

The processing at Steps S169, S171 will be explained in detail. In acase where an operation that selects the menu image 701 (“Input Symbol”)is detected, the CPU 401 adds a symbol with the width of one characterto the right of the position, in the character string 62 stored in thefirst buffer, that is indicated by the first cursor position offset. TheCPU 401 also adds a symbol with the width of one character to the rightof the position, in the character string 62 stored in the second buffer,that is indicated by the second cursor position offset (Step S169). TheCPU 401 updates the first cursor position offset and the second cursorposition offset by adding 1 to each of the first cursor position offsetand the second cursor position offset (Step S171). In a case where anoperation that selects the menu image 702 (“Input Bar Code”) isdetected, the CPU 401 adds a bar code to the right of the position, inthe character string 62 stored in the first buffer, that is indicated bythe first cursor position offset. The CPU 401 also adds a bar code tothe right of the position, in the character string 62 stored in thesecond buffer, that is indicated by the second cursor position offset(Step S169). The CPU 401 updates the first cursor position offset andthe second cursor position offset by adding a left-right length Xb ofthe added bar code to each of the first cursor position offset and thesecond cursor position offset (Step S171). In a case where an operationthat selects the menu image 703 (“Input Tab”) is detected, the CPU 401adds a tab to the right of the position, in the character string 62stored in the first buffer, that is indicated by the first cursorposition offset. The CPU 401 also adds a tab to the right of theposition, in the character string 62 stored in the second buffer, thatis indicated by the second cursor position offset (Step S169). The CPU401 updates the first cursor position offset and the second cursorposition offset by adding a left-right length Yb of the added tab toeach of the first cursor position offset and the second cursor positionoffset (Step S171). In a case where an operation that selects the menuimage 704 (“Delete”) is detected, the CPU 401 deletes the character tothe left of the position, in the character string 62 stored in the firstbuffer, that is indicated by the first cursor position offset. The CPU401 also deletes the character to the left of the position, in thecharacter string 62 stored in the second buffer, that is indicated bythe second cursor position offset (Step S169). The CPU 401 updates thefirst cursor position offset and the second cursor position offset bysubtracting 1 from each of the first cursor position offset and thesecond cursor position offset (Step S171).

The CPU 401 returns the processing to Step S151 (refer to FIG. 9). Basedon the second cursor position offset, the CPU 401 computes the reductionratio S by the same method as that described above (Step S151). Based onthe computed reduction ratio S, the CPU 401 reduces the characters 62Aof the character string 62 that is stored in the second buffer (StepsS155, S157), then displays the character string 62 in the input frame 61(Steps S156, S158).

A specific example will be explained. A case in which an operation thatselects the menu image 703 (“Input Tab”) is detected at a time when thesecond cursor position offset is 18 and the second character count is 15is used as an example. The left-right length Yb of the added tab is 2.The threshold value T is 0.75. The first cursor position offset and thesecond cursor position offset are updated by adding 2 to each of thefirst cursor position offset and the second cursor position offset, suchthat the second cursor position offset is updated to 20. In this case,the reduction ratio S is computed as 15/20=0.75. The computed reductionratio S is not less than the threshold value T. Therefore, the CPU 401changes (reduces) the font size of the characters 62A of the characterstring 62 that is stored in the second buffer to the size that iscomputed by multiplying the initial size P by the reduction ratio S(Step S157). The character string 62 reduced based on the reductionratio S is displayed left-justified in the input frame 61, along withthe cursor 63 (Step S158).

A case in which an operation that selects the menu image 703 (“InputTab”) is detected again is used as an example. The first cursor positionoffset and the second cursor position offset are updated by adding 2 toeach of the first cursor position offset and the second cursor positionoffset, such that the second cursor position offset is updated to 22. Inthis case, the reduction ratio S is computed as 15/22=0.68. The computedreduction ratio S is less than the threshold value T. Therefore, thefont size of the characters 62A of the character string 62 that isstored in the second buffer is changed (reduced) to the size that iscomputed by multiplying the initial size P by the threshold value T(Step S155). The offset count C is set to the number of the characters62A that are overlapped by the selection image 71 when the characterstring 62 reduced based on the threshold value T is displayedleft-justified in the input frame 61. The character string 62 reducedbased on the threshold value T is displayed left-justified in the inputframe 61, starting from the character 62A that is offset from the startof the character string 62 by the offset count C (Step S156). The cursor63 is displayed in the position that is indicated by the updated secondcursor position offset (Step S156). Thus, in a case where the left-rightlength from the start of the character string 62 reduced based on thethreshold value T to the position of the cursor 63 does not fit insidethe input frame 61 in the second residual area 60A, the CPU 401 is ableto shift the reduced character string 62 to the left by number ofcharacters that is indicated by the offset count C and to display theshifted character string 62 in the input frame 61. In this case, thecharacters 62A of the reduced character string 62 that precede thecharacter 62A that is offset from the start of the character string 62by the offset count C are not displayed in the input frame 61.

As shown in FIG. 10, in a case where it is determined that an operationthat selects one of the menu images 701 to 704 is not detected (NO atStep S161), the CPU 401 determines whether an operation is detected thatpresses one of the Fn keys (Step S163). In a case where it is determinedthat an operation that presses one of the Fn keys is not detected (NO atStep S163), the CPU 401 returns the processing to Step S161. The CPU 401continues to wait for an operation that selects one of the menu images701 to 704. In a case where it is determined that an operation thatpresses one of the Fn keys is detected (YES at Step S163), the CPU 401deletes the selection image 71 that is displayed in the third area 70(Step S165).

In a case where the print image 51 has been moved to the left by theprocessing at Step S147 (refer to FIG. 9), the CPU 401 moves the printimage 51 to the right, returning the print image 51 to its originalposition (Step S167). The CPU 401 displays in the first area 50 theprint image 51 returned to its original position (Step S167).

In a case where the font size of the character string 62 has beenreduced by the processing at Steps S155, S157, the CPU 401 returns thefont size of the character string 62 to the original initial size P(Step S167). In a case where the first cursor position offset is notless than the first character count, the CPU 401 copies into the secondbuffer, from the character string 62 that is stored in the first buffer,a number of characters that is equal to the first character count,counting to the left from the character at the position that isindicated by the first cursor position offset. The CPU 401 displaysleft-justified in the input frame 61 the characters 62A that are storedin the second buffer (Step S167). The CPU 401 updates the second cursorposition offset and displays the cursor 63 at the position that isindicated by the updated second cursor position offset (Step S167). Incontrast, in a case where the first cursor position offset is less thanthe first character count, the CPU 401 copies into the second buffer,from the character string 62 that is stored in the first buffer, all ofthe characters to the left of the character at the position that isindicated by the first cursor position offset. The CPU 401 displaysleft-justified in the input frame 61 the characters 62A that are storedin the second buffer (Step S167).

The CPU 401 determines whether the processing at Step S133 in the thirdmain processing (refer to FIG. 9) is performed and printing is done(Step S173). In a case where it is determined that printing is notperformed (NO at Step S173), the CPU 401 returns the processing to StepS141 (refer to FIG. 9). The CPU 401 continues to wait for the pressingof one of the Fn keys. In a case where it is determined that printing isperformed (YES at Step S173), the CPU 401 terminates the fourth mainprocessing.

As explained above, in the second embodiment, the CPU 401 of the printer1 displays the selection image 71 in response to the pressing of one ofthe Fn keys on the keyboard 5. In this case, the CPU 401 determineswhether the selection image 71 overlaps the selected block 51C selectedby the user from among the blocks 51A to 51C in the print image 51 (StepS145). In a case where it is determined that the selection image 71overlaps the selected block 51C (YES at Step S145), the CPU 401 movesthe print image 51 to the left such that the entire block 51C isdisposed in the first residual area 50A (Step S147), then displays theprint image 51 (Step S148). It is thus possible to inhibit the selectionimage 71 from overlapping the selected block 51C such that at least aportion of the selected block 51C is not displayed. The user istherefore able to perform editing of the character string 62 whilechecking the entire selected block 51C in the print image 51. Therefore,the editing of the character string 62 can be performed appropriately.

The CPU 401 determines whether the selection image 71 overlaps thecursor 63 when the selection image 71 is displayed in response to thepressing of one of the Fn keys on the keyboard 5 (Step S149). In a casewhere it is determined that the selection image 71 overlaps the cursor63 (YES at Step S149), the CPU 401 reduces the character string 62 suchthat the character string 62 can fit into the input frame 61 in thesecond residual area 60A (Steps S155, S157). The CPU 401 displays thereduced character string 62 and the cursor 63 in the input frame 61 inthe second residual area 60A (Steps S156, S158). It is thus possible toinhibit the selection image 71 from overlapping the cursor 63 such thatthe cursor 63 is not displayed. The user is therefore able to performediting of the character string 62 while using the cursor 63 to checkthe position where the character string 62 is to be edited. Therefore,the user is able to perform the editing of the character string 62appropriately.

The CPU 401 compares the computed reduction ratio S to the thresholdvalue T (Step S153). In a case where the reduction ratio S is less thanthe specified threshold value T (YES at Step S153), the CPU 401 reducesthe character string 62 using the threshold value T instead of thereduction ratio S (Step S155). The CPU 401 is thus able to inhibit thecharacter string 62 from being reduced by a reduction ratio S that isless than the threshold value T. Therefore, the CPU 401 is able toinhibit the visibility of the character string 62 from being impaired bythe displaying in the input frame 61 of the character string 62 reducedby a reduction ratio S that is less than the threshold value T. The CPU401 is therefore able to maintain the visibility of the character string62 to be edited while the character string 62 is displayed in the inputframe 61.

In a case where the reduction ratio S is less than the threshold value T(YES at Step S153), the CPU 401 reduces the character string 62 usingthe threshold value T (Step S155). In this case, if the horizontal(left-right) length from the start of the reduced character string 62 tothe position of the cursor 63 does not fit inside the input frame 61 inthe second residual area 60A, the CPU 401 is able to shift the reducedcharacter string 62 and the cursor 63 to the left by number ofcharacters that is indicated by the offset count C and to display theshifted character string 62 and cursor 63 in the input frame 61. Thus,even in a case where the character string 62 is reduced using thethreshold value T, the user is able to perform editing of the characterstring 62 while using the cursor 63 to check the position where thecharacter string 62 is to be edited.

In a case where it is determined that a selection operation is detectedthat touches one of the menu images 701 to 704 in the selection image 71(YES at Step S161), the CPU 401 uses the corresponding editing action toedit the character string 62 (Step S169). The CPU 401 moves the cursor63 in accordance with the editing action (Step S171). The CPU 401computes the reduction ratio S based on the position of the moved cursor63 (Step S151). Thus the CPU 401 is able to inhibit the overlapping ofthe cursor 63 by the selection image 71, even after the editing of thecharacter string 62 is performed according to the selection image 71.The user is therefore able to perform editing of the character string 62while using the cursor 63 to check the position where the characterstring 62 is to be edited, even after the character string 62 is editedin accordance with an operation that touches one of the menu images 701to 704. Therefore, the user is able to perform the editing of thecharacter string 62 even more appropriately.

Various types of modifications can be made to the embodiments that aredescribed above. In the first embodiment, the CPU 401 displays theselection image 46 to the right of the center, in the left-rightdirection, of the display portion 4. The CPU 401 may display theselection image 46 to the left of the center, in the left-rightdirection, of the display portion 4. This will be explained in detailwith reference to FIG. 6. On an edit screen 101A, the character string40 “brother indust” is displayed on the display portion 4, and thecursor 41 is displayed to the right of the character 40A “r”, which isthe last character of “brother” in the character string 40. A case inwhich one of the Fn keys is pressed at this time is used as an example.Unlike in the first embodiment, the selection image 46 is displayed onthe display portion 4 inside the first display area 4A, to the left ofthe center, in the left-right direction, of the display portion 4, asshown on an edit screen 101B. It is assumed that the selection image 46is displayed while the left-right position of the character string 40 ismaintained. In that case, the selection image 46 is displayed in aposition where the selection image 46 overlaps the position of thecursor 41 on the edit screen 101A.

In this sort of case, the CPU 401 moves the character string 40 to theright (the arrow 33) until the cursor 41 is disposed in a position wherethe cursor 41 is not overlapped by the displayed selection image 46, ormore specifically, a position that is one character's width to the rightof the right edge of the selection image 46. Therefore, even after theselection image 46 is displayed, the user is able to check the positionof the cursor 41 in relation to the character string 40, as well as oneof the adding position (the space to the right of the cursor 41) and thedeleting position (one of the space to the right of the cursor 41 andthe character 40A “r” to the left of the cursor 41) that is indicated bythe cursor 41.

A case in which an operation that selects the menu image 464 (“Delete”)in the selection image 46 is performed while the edit screen 101B isbeing displayed is used as an example. In this case, the CPU 401 firstdeletes the character 40A “r” to the left of the cursor 41 in thecharacter string 40, then relocates the cursor 41 to the right side ofthe character 40A “e”, which is to the left of the deleted character40A. Next, as shown in the edit screen 101C, the CPU 401 moves thecharacter string 40 to the right (the arrow 34) until the relocatedcursor 41 is disposed in a position that is one character's width to theright of the right edge of the selection image 46. Therefore, even afterthe menu image 464 in the selection image 46 is selected and thecharacter string 40 is edited, the user is able to continue checking theposition of the cursor 41, as well as one of the adding position (thespace to the right of the cursor 41) and the deleting position (one ofthe space to the right of the cursor 41 and the character 40A “e” to theleft of the cursor 41) that is indicated by the cursor 41.

In the first embodiment, in a case where the selection image 46 isdisplayed on the display portion 4, the CPU 401 moves the characterstring 40 to the left until the cursor 41 is displayed in a positionthat is one character's width to the left of the left edge of theselection image 46. Specifically, in the processing at Step S47, the CPU401 computes the first movement value by adding 1 as the specified valueto the subtraction value. The CPU 401 thus moves the character string 40and the cursor 41 that are displayed on the display portion 4 to theleft by the amount of the first movement value. In contrast, thespecified value may be zero. That is, the CPU 401 may set the firstmovement value to the subtraction value. The CPU 401 may then move thecharacter string 40 and the cursor 41 that are displayed on the displayportion 4 to the left by the amount of the first movement value. In thatcase, the character string 40 that is displayed on the display portion 4is moved to the left until the cursor 41 is displayed in the sameposition as the left edge of the selection image 46. The amount by whichthe character string 40 is moved is thus kept to the minimum. It istherefore possible to display the maximum number of the characters 40Ain the first display area 4A. Therefore, the user is able to recognize agreater number of the characters in the character string 40.

In the first embodiment, the specific value of the specified value is 1.The specified value may be changed to another value (Z) that is not lessthan 2. In that case, when the selection image 46 is displayed, thecursor 41 may be displayed in a position that is Z characters' width tothe left of the left edge of the selection image 46.

In the first embodiment, the right edge of the selection image 46 isdisplayed to left of the right edge of the display portion 4. Incontrast, the right edge of the selection image 46 may be displayed inthe same position as the right edge of the display portion 4. In thefirst embodiment, the bottom edge of the selection image 46 is displayedabove the bottom edge of the display portion 4. In contrast, the bottomedge of the selection image 46 may be displayed in the same position asthe bottom edge of the display portion 4.

In the first embodiment and the modified example, the left-right lengthof the selection image 46 is shorter than the left-right length of thedisplay portion 4. In the first embodiment and the modified example, theselection image 46 is displayed to one of the right (refer to FIG. 3)and the left (refer to FIG. 6) of the center, in the left-rightdirection, of the display portion 4. In contrast, the left-right lengthof the selection image 46 may be made longer than one-half of theleft-right length of the display portion 4. In that case, the selectionimage 46 is disposed to both the left and the right of the center, inthe left-right direction, of the display portion 4. The CPU 401 may movethe character string 40 and the cursor 41 to the left such that thecursor 41 is displayed to the left of the left edge of the selectionimage 46 whose left-right length is greater than it is in the firstembodiment. The CPU 401 may move the character string 40 and the cursor41 to the right such that the cursor 41 is displayed to the right of theright edge of the selection image 46 whose left-right length is greaterthan it is in the modified example of the first embodiment.

In the first embodiment and the modified example, the selection image 46is displayed in a fixed position to one of the right (refer to FIG. 3)and the left (refer to FIG. 6) of the center, in the left-rightdirection, of the display portion 4. In contrast, the CPU 401 may switchbetween displaying the selection image 46 on the left side anddisplaying the selection image 46 on the right side, in accordance withthe type of the pressed Fn key. The CPU 401 may switch the menu images461 to 464 that are contained in the selection image 46, in accordancewith the type of the pressed Fn key. The CPU 401 may vary the specifiedvalue in accordance with the editing actions that are indicated by themenu images 461 to 464 that are contained in the selection image 46.

in the second embodiment, the CPU 401 displays the selection image 71 inthe third area 70 in response to the pressing of one of the Fn keys onthe keyboard 5. In this case, the CPU 401 moves the print image 51 tothe left (the arrow 81 (refer to FIG. 7); Step S147 (refer to FIG. 9))to a position where the selected block 51C is not overlapped by theselection image 71, or in other words, until the selected block 51C isdisposed in the first residual area 50A. In contrast, the CPU 401 mayuse a different method for modifying the form in which the print image51 is displayed. A modified example of the second embodiment willhereinafter be explained.

The edit screen 200 (the edit screen 200A, an edit screen 200E) that isdisplayed on the display portion 4 will be explained with reference toFIG. 11. The edit screen 200A that is shown in FIG. 11 is the same asthe edit screen 200A that is shown in FIG. 7. A case in which one of theFn keys on the keyboard 5 is pressed and the selection image 71 isdisplayed in the third area 70 will be explained with reference to theedit screen 200E. In the modified example, unlike on the edit screens200B to 200D that are shown in FIG. 7, the print image 51 is disposed inthe first residual area 50A in reduced form. Specifically, the CPU 401first moves the print image 51 to the left (the arrow 82) until theentire selected block 51C is disposed in the first residual area 50A.Next, the CPU 401 determines whether the entire print image 51 that hasbeen moved fits into the first residual area 50A. In a case where it isdetermined that the moved print image 51 does not fit into the firstresidual area 50A, and that a portion of the moved print image 51protrudes beyond the first residual area 50A, the CPU 401 reduces theprint image 51 such that the entire print image 51 fits into the firstresidual area 50A. Next, the CPU 401 displays the reduced print image 51in the first residual area 50A. In this case, the user is able to checkthe entire print image 51, even after the selection image 71 isdisplayed. The method for displaying the character string 62 in theinput frame 61 of the second residual area 60A is the same as in thesecond embodiment.

The fourth main processing in the modified example of the secondembodiment will be explained with reference to FIG. 9. The processingthat is different from the fourth main processing in the embodiment thatis described above is the processing at Steps S147 and S148. In a casewhere it is determined that the selection image 71 overlaps the selectedblock 51C (YES at Step S145), the CPU 401 moves the print image 51 tothe left such that the selected block 51C fits into the first residualarea 50A (Step S147). In a case where it is determined that a portion ofthe print image 51 protrudes beyond the first residual area 50A, the CPU401 reduces the print image 51 such that the print image 51 fits intothe first residual area 50A (Step S147). Specifically, the CPU 401computes a reduction ratio U by dividing the horizontal length L3 of theprint image 51 by a horizontal length L4 of the first residual area 50A.Based on the reduction ratio U, the CPU 401 reduces the lengths of thevertical and horizontal dimensions of the moved print image 51. The CPU401 displays the reduced print image 51 in the first residual area 50A(Step S148). The CPU 401 advances the processing to Step S149.

As explained above, in a case where it is determined that the selectionimage 71 overlaps the selected block 51C (YES at Step S145), the CPU 401may reduce the print image 51 until the print image 51 becomes smallerthan the first residual area 50A (Step S147). The CPU 401 may displaythe reduced print image 51 in the first residual area 50A (Step S148).In this way, the CPU 401 is able to inhibit the selection image 71 fromoverlapping the selected block 51C and to inhibit a portion of the printimage 51 from not being displayed. The user is therefore able to performediting of the character string 62 while checking the entire print image51. Therefore, the editing of the character string 62 can be performedappropriately.

In the second embodiment and the modified example, the CPU 401 displaysthe selection image 71 to the right of the center, in the left-rightdirection, of the display portion 4. The CPU 401 may display theselection image 71 to the left of the center, in the left-rightdirection, of the display portion 4. In the second embodiment and themodified example, the left-right length of the selection image 71 isshorter than the left-right length of the display portion 4. Theselection image 71 is displayed to the right of the center, in theleft-right direction, of the display portion 4. In contrast, theleft-right length of the selection image 71 may be made longer thanone-half of the left-right length of the display portion 4. In thatcase, the selection image 71 is disposed to both the left and the rightof the center, in the left-right direction, of the display portion 4.The CPU 401 may move the character string 62 and the cursor 63 to theleft such that the cursor 63 is displayed to the left of the left edgeof the selection image 71 whose left-right length is greater than it isin the second embodiment and the modified example. The CPU 401 may movethe character string 62 and the cursor 63 to the right such that thecursor 63 is displayed to the right of the right edge of the selectionimage 71 whose left-right length is greater than it is in the secondembodiment and the modified example.

In the second embodiment and the modified example, the selection image71 is displayed in a fixed position to the right of the center, in theleft-right direction, of the display portion 4. In contrast, the CPU 401may switch between displaying the selection image 71 on the left sideand displaying the selection image 71 on the right side, in accordancewith the type of the pressed Fn key. The CPU 401 may switch the menuimages 701 to 704 that are contained in the selection image 71, inaccordance with the type of the pressed Fn key.

In the second embodiment, the CPU 401 computes the reduction ratio S bydividing the second character count by the second cursor positionoffset. The CPU 401 may also compute the reduction ratio by a differentmethod. For example, the CPU 401 may compute a reduction ratio s bytaking the number of the characters 62A that are not displayed, due tothe selection image 71, when the characters 62A stored in the secondbuffer are displayed in the input frame 61 at their initial size, thendividing the number of the undisplayed characters 62A by the secondcursor position offset. The CPU 401 may compare the computed reductionratio s to a specified threshold value t (for example, 0.20). In a casewhere the reduction ratio s is not greater than the threshold value t,the CPU 401 may compute a value (1−s) by subtracting the reduction ratios from 1. The CPU 401 may then change (reduce) the font size of thecharacters 62A in the character string 62 that is stored in the secondbuffer by multiplying the initial size P by the value (1−s). On theother hand, in a case where the reduction ratio s is greater than thethreshold value t, the CPU 401 may compute a value (1−t) by subtractingthe threshold value t from 1. The CPU 401 may then change (reduce) thefont size of the characters 62A in the character string 62 that isstored in the second buffer by multiplying the initial size P by thevalue (1−t).

The processing will now be described in detail. A case in which thesecond cursor position offset is 18 and the second character count is 15is used as an example. The reduction ratio s is computed as 3/18=0.17.In this case, the left-right lengths of the characters 62A that areshown at the initial size P need to be reduced by 17%. The CPU 401compares the reduction ratio s to the threshold value t (for example,0.20). The reduction ratio s is not greater than the threshold value t.Therefore, the CPU 401 changes (reduces) the font size of the characters62A in the character string 62 that is stored in the second buffer bymultiplying the initial size P by the value (1−s=0.83).

By way of contrast, a case in which the second cursor position offset is19 and the second character count is 15 is used as an example. Thereduction ratio s is computed as 4/19=0.21. In this case, the left-rightlengths of the characters 62A that are shown at the initial size P needto be reduced by 21%. The CPU 401 compares the reduction ratio s to thethreshold value t (for example, 0.20). The reduction ratio s is greaterthan the threshold value t. Therefore, the CPU 401 changes (reduces) thefont size of the characters 62A in the character string 62 that isstored in the second buffer by multiplying the initial size P by thevalue (1−t=0.80).

In the second embodiment, the CPU 401 makes the characters 62A stored inthe second buffer the targets of the reduction that is based on thereduction ratio S. In contrast, the CPU 401 may instead reduce thecharacters 62A stored in the first buffer, based on the reduction ratioS, and display the reduced characters 62A in the input frame 61. In thatcase, all of the input characters 62A are reduced and displayed in theinput frame 61. Therefore, the user is able to recognize all of theinput characters 62A, even after the selection image 71 is displayed.

The apparatus and methods described above with reference to the variousembodiments are merely examples. It goes without saying that they arenot confined to the depicted embodiments. While various features havebeen described in conjunction with the examples outlined above, variousalternatives, modifications, variations, and/or improvements of thosefeatures and/or examples may be possible. Accordingly, the examples, asset forth above, are intended to be illustrative. Various changes may bemade without departing from the broad spirit and scope of the underlyingprinciples.

What is claimed is:
 1. An editing apparatus comprising: a processor; anda memory configured to store computer-readable instructions, wherein thecomputer-readable instructions, when executed by the processor, causethe editing apparatus to perform processes comprising: causing a markand at least one portion of a character string to be displayed on adisplay portion, the at least one portion of the character string beingconfigured to be displayed left-justified on the display portion in aleft-right direction, the mark being configured to be displayed in aposition in relation to the at least one portion of the characterstring, and the mark indicating a position where the character string isto be edited in accordance with an operation on an input portion;causing a selection image to be displayed in a portion of the displayportion in a state in which the at least one portion of the characterstring and the mark are displayed, the selection image being an image tobe used for selecting one of a plurality of editing actions; performing,in a case where the selection image is displayed in the portion of thedisplay portion, a determination whether the mark ceases to be displayedin an outer side of one of a left edge and a right edge of the selectionimage in the left-right direction; and moving the at least one portionof the character string and the mark to a position where the mark isdisplayed in the outer side of the one of the left edge and the rightedge of the selection image, in response to determining that the markceases to be displayed in the outer side of the one of the left edge andthe right edge of the selection image.
 2. The editing apparatusaccording to claim 1, wherein the causing the selection image to bedisplayed includes causing the selection image to be displayed to rightof a center, in the left-right direction, of the display portion, theperforming the determination includes determining that the mark ceasesto be displayed to left of the left edge of the selection image in acase where a first value is one of equal to and greater than a thresholdvalue, the first value indicating a left-right length of a portion, ofthe character string, that is to left of the mark, the threshold valuebeing one of equal to and less than a second value, and the second valueindicating a left-right length from a left edge of the display portionto the left edge of the selection image, and the moving the at least oneportion of the character string and the mark to the outer side of theone of the left edge and the right edge includes moving the at least oneportion of the character string and the mark to the left.
 3. The editingapparatus according to claim 2, wherein the moving the at least oneportion of the character string and the mark to the outer side of theone of the left edge and the right edge of the selection image includesmoving the at least one portion of the character string and the mark tothe left by a movement amount, the movement amount being a value that isone of equal to and greater than a subtraction value, and thesubtraction value being a value that is computed by subtracting thesecond value from the first value.
 4. The editing apparatus according toclaim 3, wherein the movement amount is equal to the subtraction value.5. The editing apparatus according to claim 1, wherein thecomputer-readable instructions, when executed by the processor, furthercause the editing apparatus to perform processes comprising: receivingan operation that selects one of the plurality of editing actions basedon the displayed selection image; and moving the at least one portion ofthe character string and the mark to one of the left and the right to aposition where the mark is displayed in the outer side of the one of theleft edge and the right edge of the selection image, after the characterstring is edited in accordance with the selected one of the plurality ofthe editing actions.
 6. The editing apparatus according to claim 1,wherein the mark is a cursor being a straight line segment that extendsvertically, the cursor is configured to indicate right of the linesegment as an adding position where a character is to be added to thecharacter string, and the cursor is configured to indicate one of leftand the right of the line segment as a deleting position where acharacter is to be deleted from the character string.
 7. A printercomprising the editing apparatus according to claim 1, furthercomprising: a printing portion configured to print on a printing medium,wherein the computer-readable instructions, when executed by theprocessor, further cause the editing apparatus to perform a processcomprising: causing the printing portion to print, on the printingmedium, at least one portion of the character string displayed on thedisplay portion.
 8. An editing apparatus comprising: a processor; and amemory configured to store computer-readable instructions, wherein thecomputer-readable instructions, when executed by the processor, causethe editing apparatus to perform processes comprising: causing a printimage to be displayed in a first area of a display portion and a markand at least one portion of a target character string to be displayed ina second area of the display portion, the print image including aplurality of blocks, a plurality of character strings being respectivelyassociated with the plurality of the blocks, the target character stringbeing one of the plurality of the character strings that corresponds toa corresponding block, the corresponding block being one of theplurality of the blocks, the mark indicating a position where editing isto be performed on the target character string, and the second areabeing a different area from the first area; causing a selection image tobe displayed in a third area of the display portion in a state in whichthe print image is displayed in the first area and the target characterstring is displayed in the second area, the selection image being animage to be used for selecting one of a plurality of editing actions,and the third area including at least one portion of the first area andat least one portion of the second area; performing a firstdetermination whether the corresponding block included in the printimage displayed in the first area overlaps with the selection imagedisplayed in the third area; causing the entire corresponding block tobe displayed in a first residual area by modifying a form in which theprint image is displayed, in response to determining that thecorresponding block overlaps with the selection image, the firstresidual area being an area, within the first area, that is exclusive ofthe third area; performing a second determination whether the markdisplayed in the second area overlaps with the selection image displayedin the third area; reducing a size of the target character string inresponse to determining that the mark overlaps with the selection image;and causing the mark and at least one portion of a reduced characterstring to be displayed in a second residual area, the reduced characterstring being the target character string whose size is reduced, and thesecond residual area being an area, within the second area, that isexclusive of the third area.
 9. The editing apparatus according to claim8, wherein the causing the entire corresponding block to be displayed inthe first residual area includes: moving the print image to a positionwhere the entire corresponding block is displayed in the first residualarea; and causing the moved print image to be displayed in the firstresidual area.
 10. The editing apparatus according to claim 8, whereinthe causing the entire corresponding block to be displayed in the firstresidual area includes: reducing a size of the print image to a sizethat is smaller than a size of the first residual area; and causing areduced image to be displayed in the first residual area, the reducedimage being the print image whose size is reduced.
 11. The editingapparatus according to claim 8, wherein the computer-readableinstructions, when executed by the processor, further cause the editingapparatus to perform processes comprising: computing a reduction ratioby which the size of the target character string is to be reduced; andperforming a third determination whether the computed reduction ratioand a specified threshold value satisfy a specified condition, thereducing the size of the target character string includes: reducing thesize of the target character string based on the reduction ratio inresponse to determining that the specified condition is satisfied; andreducing the size of target character string based on the thresholdvalue in response to determining that the specified condition isunsatisfied.
 12. The editing apparatus according to claim 11, whereinthe computing the reduction ratio includes computing the reduction ratioas a ratio of the reduced size of the target character string to thesize of the target character string before the size of the targetcharacter string is reduced, and the performing the third determinationincludes determining that the specified condition is satisfied in a casewhere the reduction ratio is one of equal to and greater than thethreshold value and determining that the specified condition isunsatisfied in a case where the reduction ratio is less than thethreshold value.
 13. The editing apparatus according to claim 11,wherein the computing the reduction ratio includes computing thereduction ratio as a ratio of a difference to the size of the targetcharacter string before the size of the target character string isreduced, the difference being a difference between the size of thetarget character string before the size of the target character stringis reduced and the reduced size of the target character string, and theperforming the third determination includes determining that thespecified condition is satisfied in a case where the reduction ratio isone of equal to and less than the threshold value and determining thatthe specified condition is unsatisfied in a case where the reductionratio is greater than the threshold value.
 14. The editing apparatusaccording to claim 11, wherein the causing the mark and the at least oneportion of the reduced character string to be displayed in the secondresidual area includes causing the at least one portion of the reducedcharacter string to be displayed by moving the reduced character stringto a position where the mark is displayed in the second residual area,in a case where a first length is greater than a second length, thefirst length being a horizontal length to a position of the mark from astart of the reduced character string reduced based on the thresholdvalue, and the second length being a horizontal length of the secondresidual area.
 15. The editing apparatus according to claim 8, whereinthe computer-readable instructions, when executed by the processor,further cause the editing apparatus to perform a process comprising:receiving an operation that selects one of the plurality of editingactions based on the displayed selection image, and the reducing thesize of the target character string includes reducing the size of thetarget character string based on a position of the mark after the targetcharacter string is edited in accordance with the selected one of theplurality of the editing actions, in a case where the operation thatselects the one of the plurality of the editing actions is received. 16.The editing apparatus according to claim 8, wherein the mark is a cursorbeing a straight line segment that extends vertically, the cursor isconfigured to indicate right of the line segment as an adding positionwhere a character is to be added to the target character string, and thecursor is configured to indicate one of left and the right of the linesegment as a deleting position where a character is to be deleted fromthe target character string.
 17. A printer comprising the editingapparatus according to claim 8, further comprising: a printing portionconfigured to print on a printing medium, wherein the computer-readableinstructions, when executed by the processor, further cause the editingapparatus to perform a process comprising: causing the printing portionto print on the printing medium, based on the print image displayed onthe display portion.